From 4d85a54027c317e4c41661ed4c6d9d284ca683fe Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Mon, 13 Mar 2017 20:34:16 -0700 Subject: [PATCH] Change verify-godeps.sh use ensure_godep_version --- hack/lib/golang.sh | 29 +---------------------------- hack/verify-godeps.sh | 18 +++--------------- 2 files changed, 4 insertions(+), 43 deletions(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 4632fcca591..c1259a4896a 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -38,7 +38,7 @@ kube::golang::server_targets() { readonly KUBE_SERVER_TARGETS=($(kube::golang::server_targets)) readonly KUBE_SERVER_BINARIES=("${KUBE_SERVER_TARGETS[@]##*/}") -# The set of server targets that we are only building for Kubernetes nodes +# The set of server targets that we are only building for Kubernetes nodes # If you update this list, please also update build/release-tars/BUILD. kube::golang::node_targets() { local targets=( @@ -313,33 +313,6 @@ kube::golang::create_gopath_tree() { EOF } -# Ensure the godep tool exists and is a viable version. -kube::golang::verify_godep_version() { - local -a godep_version_string - local godep_version - local godep_min_version="63" - - if ! which godep &>/dev/null; then - kube::log::usage_from_stdin <&1 > /dev/null - # Build the godep tool - go get -u github.com/tools/godep 2>/dev/null - export GODEP="${GOPATH}/bin/godep" - pin-godep() { - pushd "${GOPATH}/src/github.com/tools/godep" > /dev/null - git checkout "$1" - "${GODEP}" go install - popd > /dev/null - } - # Use to following if we ever need to pin godep to a specific version again - pin-godep 'v74' - "${GODEP}" version + kube::util::ensure_godep_version v79 export GOPATH="${GOPATH}:${_kubetmp}/staging" # Fill out that nice clean place with the kube godeps echo "Starting to download all kubernetes godeps. This takes a while" - "${GODEP}" restore + godep restore echo "Download finished" # Destroy deps in the copy of the kube tree @@ -132,7 +120,7 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null ret=1 fi - if ! _out="$(diff -Naupr -x 'BUILD' vendor ${_kubetmp}/vendor)"; then + if ! _out="$(diff -Naupr -x "BUILD" -x "AUTHORS*" -x "CONTRIBUTORS*" vendor ${_kubetmp}/vendor)"; then echo "Your vendored results are different:" echo "${_out}" echo "Godeps Verify failed."