From 64bc39170792153bc31781fa4a94850650a11fb3 Mon Sep 17 00:00:00 2001 From: Valere JEANTET Date: Mon, 18 Jul 2016 20:41:31 +0200 Subject: [PATCH] build for used binaries first --- release.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/release.sh b/release.sh index 2a02154..9af194a 100755 --- a/release.sh +++ b/release.sh @@ -9,6 +9,14 @@ rm ${releaseFolder}*.zip rice embed-go +arch=amd64 +os=windows +product=${productName}_${versionLabel}_${os}_${arch} +env GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X main.version=${1} -X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` " -o ${product}.exe cmd/main.go +zip -r ${product}.zip ${product}.exe +rm $product.exe +mv $product.zip ${releaseFolder}/ + arch=amd64 os=darwin product=${productName}_${versionLabel}_${os}_${arch} @@ -17,8 +25,7 @@ tar czfv $product.tgz $product rm $product mv $product.tgz ${releaseFolder}/ - -arch=amd64 +arch=arm os=linux product=${productName}_${versionLabel}_${os}_${arch} env GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X main.version=${1} -X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` " -o $product cmd/main.go @@ -26,7 +33,7 @@ tar czfv $product.tgz $product rm $product mv $product.tgz ${releaseFolder}/ -arch=386 +arch=amd64 os=linux product=${productName}_${versionLabel}_${os}_${arch} env GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X main.version=${1} -X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` " -o $product cmd/main.go @@ -34,7 +41,7 @@ tar czfv $product.tgz $product rm $product mv $product.tgz ${releaseFolder}/ -arch=arm +arch=386 os=linux product=${productName}_${versionLabel}_${os}_${arch} env GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X main.version=${1} -X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` " -o $product cmd/main.go @@ -42,14 +49,6 @@ tar czfv $product.tgz $product rm $product mv $product.tgz ${releaseFolder}/ -arch=amd64 -os=windows -product=${productName}_${versionLabel}_${os}_${arch} -env GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X main.version=${1} -X main.buildstamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` " -o ${product}.exe cmd/main.go -zip -r ${product}.zip ${product}.exe -rm $product.exe -mv $product.zip ${releaseFolder}/ - arch=386 os=windows product=${productName}_${versionLabel}_${os}_${arch}