diff --git a/build/linux.sh b/build/linux.sh index 8cbba323..00df7757 100755 --- a/build/linux.sh +++ b/build/linux.sh @@ -2,9 +2,15 @@ VERS=$(git describe --tags --abbrev=0) NAME=surreal-${VERS}.linux-amd64 +HASH=${NAME}.txt FILE=${NAME}.tgz GOOS=linux 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/ -rm -rf $FILE surreal +aws s3 cp --region eu-west-2 --cache-control "no-store" ./$HASH s3://download.surrealdb.com/ + +rm -rf $FILE $HASH surreal.exe surreal diff --git a/build/macos.sh b/build/macos.sh index 6d3d6c94..2dc82bd2 100755 --- a/build/macos.sh +++ b/build/macos.sh @@ -2,9 +2,15 @@ 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/ -rm -rf $FILE surreal +aws s3 cp --region eu-west-2 --cache-control "no-store" ./$HASH s3://download.surrealdb.com/ + +rm -rf $FILE $HASH surreal.exe surreal diff --git a/build/windows.sh b/build/windows.sh index ea3c82ab..f6b0b645 100755 --- a/build/windows.sh +++ b/build/windows.sh @@ -2,9 +2,15 @@ VERS=$(git describe --tags --abbrev=0) NAME=surreal-${VERS}.windows-amd64 +HASH=${NAME}.txt FILE=${NAME}.tgz GOOS=windows 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/ -rm -rf $FILE surreal +aws s3 cp --region eu-west-2 --cache-control "no-store" ./$HASH s3://download.surrealdb.com/ + +rm -rf $FILE $HASH surreal.exe surreal