Merge pull request #1260 from eparis/config-gopath-overrides

Config gopath overrides
This commit is contained in:
Filipe Brandenburger 2014-09-10 13:58:28 -07:00
commit 20c1349dba

View File

@ -105,8 +105,16 @@ kube::setup_go_environment() {
fi
fi
# Set GOPATH to point to the tree maintained by `godep`.
GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/Godeps/_workspace"
GOPATH=${KUBE_TARGET}
# Append KUBE_EXTRA_GOPATH to the GOPATH if it is defined.
if [[ -n ${KUBE_EXTRA_GOPATH:-} ]]; then
GOPATH=${GOPATH}:${KUBE_EXTRA_GOPATH}
fi
# Append the tree maintained by `godep` to the GOPATH unless KUBE_NO_GODEPS
# is defined.
if [[ -z ${KUBE_NO_GODEPS:-} ]]; then
GOPATH="${GOPATH}:${KUBE_REPO_ROOT}/Godeps/_workspace"
fi
export GOPATH
# Unset GOBIN in case it already exists in the current session.