Commit fb0cea22 authored by Jordan Liggitt's avatar Jordan Liggitt

stop clearing GOPATH in vendor scripts

if unset, go defaults to $HOME/go, and fails if $GOROOT is also set to the same directory we were only doing this to be doubly sure that only modules were being used. just depend on export GO111MODULE=on for that.
parent ca554325
...@@ -23,8 +23,6 @@ source "${KUBE_ROOT}/hack/lib/init.sh" ...@@ -23,8 +23,6 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
# Explicitly opt into go modules, even though we're inside a GOPATH directory # Explicitly opt into go modules, even though we're inside a GOPATH directory
export GO111MODULE=on export GO111MODULE=on
# Explicitly clear GOPATH, to ensure nothing this script calls makes use of that path info
export GOPATH=
# Explicitly clear GOFLAGS, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor # Explicitly clear GOFLAGS, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor
export GOFLAGS= export GOFLAGS=
# Detect problematic GOPROXY settings that prevent lookup of dependencies # Detect problematic GOPROXY settings that prevent lookup of dependencies
......
...@@ -23,8 +23,6 @@ source "${KUBE_ROOT}/hack/lib/init.sh" ...@@ -23,8 +23,6 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
# Explicitly opt into go modules, even though we're inside a GOPATH directory # Explicitly opt into go modules, even though we're inside a GOPATH directory
export GO111MODULE=on export GO111MODULE=on
# Explicitly clear GOPATH, to ensure nothing this script calls makes use of that path info
export GOPATH=
# Explicitly clear GOFLAGS, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor # Explicitly clear GOFLAGS, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor
export GOFLAGS= export GOFLAGS=
# Ensure sort order doesn't depend on locale # Ensure sort order doesn't depend on locale
......
...@@ -63,8 +63,8 @@ mkdir -p "${_kubetmp}" ...@@ -63,8 +63,8 @@ mkdir -p "${_kubetmp}"
git archive --format=tar --prefix=kubernetes/ "$(git write-tree)" | (cd "${_kubetmp}" && tar xf -) git archive --format=tar --prefix=kubernetes/ "$(git write-tree)" | (cd "${_kubetmp}" && tar xf -)
_kubetmp="${_kubetmp}/kubernetes" _kubetmp="${_kubetmp}/kubernetes"
# Do all our work with an unset GOPATH # Do all our work in module mode
export GOPATH= export GO111MODULE=on
pushd "${_kubetmp}" > /dev/null 2>&1 pushd "${_kubetmp}" > /dev/null 2>&1
# Destroy deps in the copy of the kube tree # Destroy deps in the copy of the kube tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment