From d58afe63845124afafce06739ff2638e51b29e15 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Tue, 30 Jan 2018 09:30:36 -0800 Subject: [PATCH] When installing vendored godep, ensure that it's in path --- hack/lib/util.sh | 3 +++ hack/verify-godeps.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index f699a295267..c4bfdbbca85 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -446,6 +446,9 @@ kube::util::ensure_godep_version() { kube::log::status "Installing godep version ${GODEP_VERSION}" go install ./vendor/github.com/tools/godep/ + GP="$(echo $GOPATH | cut -f1 -d:)" + hash -r # force bash to clear PATH cache + PATH="${GP}/bin:${PATH}" if [[ "$(godep version 2>/dev/null)" != *"godep ${GODEP_VERSION}"* ]]; then kube::log::error "Expected godep ${GODEP_VERSION}, got $(godep version)" diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index 92f979ba159..8d91a20578a 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -29,6 +29,9 @@ if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \ exit 0 fi +# Ensure we have the right godep version available +kube::util::ensure_godep_version + if [[ -z ${TMP_GOPATH:-} ]]; then # Create a nice clean place to put our new godeps _tmpdir="$(mktemp -d -t gopath.XXXXXX)"