surrealpatch/build/linux.sh

17 lines
512 B
Bash
Raw Normal View History

2019-12-08 13:53:49 +00:00
#!/bin/bash
VERS=$(git describe --tags --abbrev=0)
NAME=surreal-${VERS}.linux-amd64
2019-12-08 14:46:30 +00:00
HASH=${NAME}.txt
2019-12-08 13:53:49 +00:00
FILE=${NAME}.tgz
GOOS=linux GOARCH=amd64 go build -v -ldflags "$(bash build/flags.sh)"
tar -zcvf $FILE -s "#^#${NAME}/#" surreal
2019-12-08 14:46:30 +00:00
echo $(shasum -a 256 $FILE | cut -f1 -d' ') > $HASH
2019-12-08 13:53:49 +00:00
aws s3 cp --region eu-west-2 --cache-control "no-store" ./$FILE s3://download.surrealdb.com/
2019-12-08 14:46:30 +00:00
aws s3 cp --region eu-west-2 --cache-control "no-store" ./$HASH s3://download.surrealdb.com/
rm -rf $FILE $HASH surreal.exe surreal