Open-source election counting https://yingtongli.me/opentally/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
OpenTally/scripts/deploy.sh

31 lines
692 B

#!/bin/bash
DESTDIR='/home/runassudo/Documents/Work/School Cloud Data/unenc/public/www/opentally'
# Prevent deploy with unstaged changes
git update-index --refresh > /dev/null
if git diff-index --quiet HEAD -- ; then true; else
echo Cannot deploy with unstaged changes
exit 1
fi
# Rebuild WASM
./scripts/build_wasm.sh
# Build homepage
./scripts/build_homepage.sh
# Copy files
#mkdir "$DESTDIR/stv/"
cp -r html/* "$DESTDIR/stv/"
# Replace GITVERSION, etc.
GITVERSION=$(git rev-parse --short HEAD)
sed -i "s#GITVERSION#$GITVERSION#g" "$DESTDIR/stv/index.html"
sed -i "s#GITVERSION#$GITVERSION#g" "$DESTDIR/stv/index.js"
sed -i "s#GITVERSION#$GITVERSION#g" "$DESTDIR/stv/worker.js"