diff --git a/hack/lint-dependencies.sh b/hack/lint-dependencies.sh index 4c2903d04d5..14dc196d12c 100755 --- a/hack/lint-dependencies.sh +++ b/hack/lint-dependencies.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 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 export GOFLAGS= # Detect problematic GOPROXY settings that prevent lookup of dependencies diff --git a/hack/update-vendor.sh b/hack/update-vendor.sh index 80d14b5cbbd..5c1771669e5 100755 --- a/hack/update-vendor.sh +++ b/hack/update-vendor.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 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 export GOFLAGS= # Ensure sort order doesn't depend on locale diff --git a/hack/verify-vendor.sh b/hack/verify-vendor.sh index 5595c8b7aa6..496ddaa92d1 100755 --- a/hack/verify-vendor.sh +++ b/hack/verify-vendor.sh @@ -63,8 +63,8 @@ mkdir -p "${_kubetmp}" git archive --format=tar --prefix=kubernetes/ "$(git write-tree)" | (cd "${_kubetmp}" && tar xf -) _kubetmp="${_kubetmp}/kubernetes" -# Do all our work with an unset GOPATH -export GOPATH= +# Do all our work in module mode +export GO111MODULE=on pushd "${_kubetmp}" > /dev/null 2>&1 # Destroy deps in the copy of the kube tree