*: move build scripts to use GO15VENDOREXPERIMENT

closes #328
This commit is contained in:
Eric Chiang 2016-03-09 13:05:48 -08:00
parent d17790413b
commit 4a830ddcc3
3 changed files with 11 additions and 9 deletions

View file

@ -5,7 +5,6 @@ services:
language: go
go:
- 1.4.3
- 1.5.3
- 1.6

View file

@ -1,5 +1,5 @@
FROM golang:1.4
FROM golang:1.6
RUN go get golang.org/x/tools/cmd/cover
RUN go get golang.org/x/tools/cmd/vet
RUN go get github.com/tools/godep
RUN go get github.com/tools/godep

15
env
View file

@ -1,11 +1,14 @@
export GOPATH=${PWD}/Godeps/_workspace
GOVERSION=$( go version | grep -o 'go1\.[0-9]')
rm -rf $GOPATH/src/github.com/coreos/dex
mkdir -p $GOPATH/src/github.com/coreos/
UNSUPPORTED=( "go1.0" "go1.1" "go1.2" "go1.3" "go1.4" )
# Only attempt to link dex into godeps if it isn't already there
[ -d $GOPATH/src/github.com/coreos/dex ] || ln -s ${PWD} $GOPATH/src/github.com/coreos/dex
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
export GO15VENDOREXPERIMENT=1
export VERSION=$(./git-version)
LD_FLAGS="-X main.version=${VERSION}"