From 84a42c91a40ed41d11bcfc65ff55f6f5b63f42a0 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sun, 8 Dec 2019 14:46:30 +0000 Subject: [PATCH] Upload sha256 sum of files --- build/linux.sh | 8 +++++++- build/macos.sh | 8 +++++++- build/windows.sh | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) 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