diff --git a/rustc_bs.sh b/rustc_bs.sh deleted file mode 100755 index a847e10..0000000 --- a/rustc_bs.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -RUSTC_BOOTSTRAP=1 rustc $@ - diff --git a/benchmark.sh b/scripts/benchmark.sh similarity index 100% rename from benchmark.sh rename to scripts/benchmark.sh diff --git a/build_docs.sh b/scripts/build_docs.sh similarity index 100% rename from build_docs.sh rename to scripts/build_docs.sh diff --git a/build_homepage.sh b/scripts/build_homepage.sh similarity index 100% rename from build_homepage.sh rename to scripts/build_homepage.sh diff --git a/build_wasm.sh b/scripts/build_wasm.sh similarity index 100% rename from build_wasm.sh rename to scripts/build_wasm.sh diff --git a/coverage.sh b/scripts/coverage.sh similarity index 100% rename from coverage.sh rename to scripts/coverage.sh diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..88d261a --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,31 @@ +#!/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" diff --git a/mkbaseline.sh b/scripts/mkbaseline.sh similarity index 100% rename from mkbaseline.sh rename to scripts/mkbaseline.sh diff --git a/profile.sh b/scripts/profile.sh similarity index 96% rename from profile.sh rename to scripts/profile.sh index d4e5564..751c6c4 100755 --- a/profile.sh +++ b/scripts/profile.sh @@ -1,6 +1,6 @@ #!/bin/bash cargo build --profile perf || exit -rm perf.data +rm target/perf.data # Burn in ./target/perf/opentally stv tests/data/raw/VIC2022.bin --bin --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@ diff --git a/test.csp b/test.csp deleted file mode 100644 index 827122f..0000000 --- a/test.csp +++ /dev/null @@ -1,66 +0,0 @@ -Evans,Grey,Thomson,Ames,Reid,Spears,White,$mult -1,0,2,0,0,0,0,1 -0,1,0,2,0,0,3,1 -3,1,0,0,0,2,4,1 -0,1,4,0,3,2,0,1 -0,0,1,0,0,0,0,1 -0,0,0,1,0,0,0,1 -0,0,1,0,0,0,0,1 -0,0,0,1,0,0,0,1 -0,0,0,1,0,0,0,1 -0,0,1,0,0,0,0,1 -0,0,0,0,1,0,2,1 -2,0,0,1,0,0,0,1 -0,0,0,0,0,1,0,1 -0,0,0,1,0,0,0,1 -0,1,2,0,0,0,0,1 -0,0,1,0,0,0,0,1 -0,0,0,0,0,0,1,1 -0,0,0,1,0,0,0,1 -0,1,0,2,0,0,3,1 -0,1,0,2,0,0,3,1 -0,0,0,1,0,0,0,1 -0,1,2,0,0,0,0,1 -0,0,0,1,0,0,0,1 -0,0,0,0,0,0,1,1 -0,1,0,0,0,2,0,1 -2,1,0,0,0,0,0,1 -0,0,0,0,0,0,1,1 -3,1,4,2,0,0,0,1 -0,0,0,1,0,0,0,1 -0,0,0,0,0,1,0,1 -0,0,0,0,0,1,0,1 -0,1,3,2,0,0,4,1 -0,0,0,0,0,1,0,1 -0,1,0,0,0,0,2,1 -0,1,0,0,0,0,2,1 -3,1,0,0,0,2,4,1 -0,0,1,0,0,0,0,1 -0,1,0,2,0,0,3,1 -0,1,0,0,0,2,0,1 -0,1,3,2,0,0,4,1 -0,1,0,0,0,2,0,1 -0,1,0,2,0,0,3,1 -0,0,0,1,0,0,0,1 -0,1,0,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