Merge pull request #381 from ploxiln/dist_strip

dist.sh: use go build option to strip binaries
This commit is contained in:
Jehiah Czebotar 2017-04-24 16:34:22 -04:00 committed by GitHub
commit ea2540bc89
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@ for os in windows linux darwin; do
fi fi
BUILD=$(mktemp -d ${TMPDIR:-/tmp}/oauth2_proxy.XXXXXX) BUILD=$(mktemp -d ${TMPDIR:-/tmp}/oauth2_proxy.XXXXXX)
TARGET="oauth2_proxy-$version.$os-$arch.$goversion" TARGET="oauth2_proxy-$version.$os-$arch.$goversion"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -o $BUILD/$TARGET/oauth2_proxy$EXT || exit 1 GOOS=$os GOARCH=$arch CGO_ENABLED=0 \
go build -ldflags="-s -w" -o $BUILD/$TARGET/oauth2_proxy$EXT || exit 1
pushd $BUILD pushd $BUILD
tar czvf $TARGET.tar.gz $TARGET tar czvf $TARGET.tar.gz $TARGET
mv $TARGET.tar.gz $DIR/dist mv $TARGET.tar.gz $DIR/dist

View File

@ -1,3 +1,3 @@
package main package main
const VERSION = "2.2.0" const VERSION = "2.2.1-alpha"