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}