blob: f3555714dfca76c24dbe4cef867460af3f087cde [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for CT Pixel Diff.
APPNAME=ct-pixel-diff
DESCRIPTION="Server to view visual effects of a Chromium/Skia patch on different web pages using Cluster Telemetry"
SYSTEMD="${APPNAME}.service"
set -x -e
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
INSTALL="sudo install -D --verbose --backup=none --group=root --owner=root"
INSTALL_DIR="sudo install -d --verbose --backup=none --group=root --owner=root"
${INSTALL} --mode=755 -T ${GOPATH}/bin/ct_pixel_diff ${ROOT}/usr/local/bin/ct_pixel_diff
${INSTALL} --mode=644 -T ./sys/${APPNAME}.service ${ROOT}/etc/systemd/system/${APPNAME}.service
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/img
${INSTALL} --mode=644 ./frontend/res/img/favicon.ico ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/img/favicon.ico
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/js
${INSTALL} --mode=644 ./frontend/res/js/core.js ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/js/core.js
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/vul
${INSTALL} --mode=644 ./frontend/res/vul/elements.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/res/vul/elements.html
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates
${INSTALL} --mode=644 ./frontend/templates/header.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates/header.html
${INSTALL} --mode=644 ./frontend/templates/results.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates/results.html
${INSTALL} --mode=644 ./frontend/templates/runs.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates/runs.html
${INSTALL} --mode=644 ./frontend/templates/search.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates/search.html
${INSTALL} --mode=644 ./frontend/templates/stats.html ${ROOT}/usr/local/share/ct_pixel_diff/frontend/templates/stats.html
}
source ../bash/release.sh