summaryrefslogtreecommitdiff
path: root/scripts/deploy.sh
blob: 82dd7d33f35596a05af22eb6b787fa230816b846 (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://localhost.runxiyu.org:8080/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