Actually use rate limited storage, add /version with -dirty

This commit is contained in:
breel
2020-07-30 16:20:51 -06:00
parent 5a383a1e71
commit 21fa963085
14 changed files with 98 additions and 31 deletions

View File

@@ -7,21 +7,37 @@ function main() {
if [ -z "$NOTEST" ]; then
go test ./...
fi
GOOS=linux GOARCH=arm GOARM=5 CGO_ENABLED=0 go build -o $exec -a -installsuffix cgo
GOARCH=arm GOARM=5 gobuild $exec
for authed in dndex dndex-auth; do
scp ./public/swagger/* zach@tickle.lan:./$authed/files/swagger/
scp $exec zach@tickle.lan:./$authed/dndex.new
ssh zach@tickle.lan bash -c "true; while [ -e ./$authed/dndex.new ]; do printf '.'; sleep 3; done; echo"
done &
wait
GOOS=linux CGO_ENABLED=0 go build -o $exec -a -installsuffix cgo
gobuild $exec
scp $exec bel@remote.blapointe.com:/home/bel/services/bin/dndex.new
ssh bel@remote.blapointe.com bash -c 'true; md5sum ./services/bin/dndex*; while [ -e ./services/bin/dndex.new ]; do printf "."; sleep 3; done; md5sum ./services/bin/dndex*'
rm $exec
if [ -n "$BIG" ]; then
big
fi
}
function gobuild() {
GOOS=linux CGO_ENABLED=0 go build \
-o $1 \
-a \
-installsuffix cgo \
-ldflags "-s -w -X main.GitCommit=$(
(
git rev-list -1 HEAD
if git diff | grep . > /dev/null; then
echo "-dirty"
fi
) | tr -d '\n'
)"
}
function big() {
pushd ./public/vue/dndex-ui
git checkout master