dex/release

28 lines
493 B
Text
Raw Normal View History

#!/bin/bash -e
GOARCH=amd64
OSS=( "darwin" "linux" )
2016-03-03 01:33:13 +05:30
source ./env
# cannot cross compile when GOBIN is set.
# See:
# https://golang.org/issue/9769
# https://golang.org/issue/11778
unset GOBIN
for GOOS in ${OSS[@]}; do
name=dex-$VERSION-$GOOS-$GOARCH
rm -fr $name.tar.gz $name/
mkdir $name
2016-03-03 01:33:13 +05:30
GOOS=$GOOS GOARCH=$GOARCH go build -o $name/dexctl -ldflags="$LD_FLAGS" github.com/coreos/dex/cmd/dexctl
tar -czf $name.tar.gz $name/
echo "Created ${name}.tar.gz"
rm -fr $name/
done