summaryrefslogtreecommitdiff
path: root/scripts/deploy.sh
blob: f17227815be73e07561fc58513a5888c1624ff41 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -xeu

home_dir="${BASH_SOURCE[0]%/*}/.."
cd "$home_dir"

make build/static/student.js
gsed -i 's;wss://cca.runxiyu.org/ws;wss://dev.runxiyu.org/ws;g' build/static/student.js

mv dist/cca dist/ccae
GOOS=linux GOARCH=amd64 make dist/cca

rm build/static/student.js

rsync -v dist/cca root@runxiyu.org:/srv/dev/cca

ssh root@runxiyu.org pkill cca

rm dist/cca
mv dist/ccae dist/cca