surrealpatch/build/macos.sh
2019-12-08 20:54:59 +00:00

16 lines
522 B
Bash
Executable file

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