blob: 6f1e9af9ce0a924d5fc00a59c673d56af7aa6a96 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for androidingest.
APPNAME=androidingest
DESCRIPTION="Ingests incoming Android performance data."
SYSTEMD="${APPNAME}.service android-master-ingest.service gitcookiedaemon.service"
DEPENDS=git
set -e -x
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
if [ -d third_party/gcompute-tools ]; then
cd third_party/gcompute-tools
git pull
cd ../..
else
mkdir -p third_party
cd third_party
git clone https://gerrit.googlesource.com/gcompute-tools
cd ..
fi
pwd
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/androidingest ${ROOT}/usr/local/bin/androidingest
${INSTALL} --mode=755 -T ${GOPATH}/bin/androidingest ${ROOT}/usr/local/bin/android-master-ingest
${INSTALL} --mode=755 -T ./third_party/gcompute-tools/git-cookie-authdaemon ${ROOT}/usr/local/bin/git-cookie-authdaemon
${INSTALL} --mode=644 -T ./sys/${APPNAME}.service ${ROOT}/etc/systemd/system/${APPNAME}.service
${INSTALL} --mode=644 -T ./sys/android-master-ingest.service ${ROOT}/etc/systemd/system/android-master-ingest.service
${INSTALL} --mode=644 -T ./sys/gitcookiedaemon.service ${ROOT}/etc/systemd/system/gitcookiedaemon.service
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/androidingest/templates
${INSTALL} --mode=644 ./templates/* ${ROOT}/usr/local/share/androidingest/templates
${INSTALL} --mode=644 ./res/js/core.js ${ROOT}/usr/local/share/androidingest/res/js/core.js
${INSTALL} --mode=644 ./res/vul/elements.html ${ROOT}/usr/local/share/androidingest/res/vul/elements.html
${INSTALL} --mode=644 ./sys/gitconfig ${ROOT}/home/default/.gitconfig
}
source ../bash/release.sh