2016-03-10 02:35:48 +05:30
|
|
|
GOVERSION=$( go version | grep -o 'go1\.[0-9]')
|
2016-02-13 02:48:26 +05:30
|
|
|
|
2016-03-10 02:35:48 +05:30
|
|
|
UNSUPPORTED=( "go1.0" "go1.1" "go1.2" "go1.3" "go1.4" )
|
2016-02-13 02:48:26 +05:30
|
|
|
|
2016-03-10 02:35:48 +05:30
|
|
|
for V in "${UNSUPPORTED[@]}"; do
|
|
|
|
if [ "$V" = "$GOVERSION" ]; then
|
|
|
|
echo "dex requires go version 1.5+. Please update your go version."
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
done
|
2016-02-13 02:48:26 +05:30
|
|
|
|
2016-03-10 02:35:48 +05:30
|
|
|
export GO15VENDOREXPERIMENT=1
|
2016-03-03 01:33:13 +05:30
|
|
|
export VERSION=$(./git-version)
|
|
|
|
LD_FLAGS="-X main.version=${VERSION}"
|