*: fix build script to work outside of GOPATH

Closes #439
This commit is contained in:
Eric Chiang 2016-05-06 13:31:09 -07:00
parent 594c54553f
commit 16c189b7b2

11
env
View file

@ -21,6 +21,17 @@ for V in "${KNOWN_INSECURE[@]}"; do
fi
done
PROJ="dex"
ORG_PATH="github.com/coreos"
REPO_PATH="${ORG_PATH}/${PROJ}"
if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ${PWD} gopath/src/${REPO_PATH} || exit 255
fi
export GOPATH=${PWD}/gopath
export GOBIN=${PWD}/bin
export GO15VENDOREXPERIMENT=1
export VERSION=$(./git-version)
LD_FLAGS="-X main.version=${VERSION}"