2015-12-17 03:58:34 +05:30
|
|
|
#!/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
|
|
|
|
|
2015-12-17 03:58:34 +05:30
|
|
|
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
|
2015-12-17 03:58:34 +05:30
|
|
|
|
|
|
|
tar -czf $name.tar.gz $name/
|
|
|
|
echo "Created ${name}.tar.gz"
|
|
|
|
|
|
|
|
rm -fr $name/
|
|
|
|
done
|