From d31a88fee70fb1dd58c4da5251ad4c181ae946a0 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Sun, 12 Mar 2017 14:06:19 -0700 Subject: [PATCH 1/2] Bump godep version to v79 --- Godeps/Godeps.json | 4 ++-- hack/godep-save.sh | 2 +- hack/lib/util.sh | 5 +++-- hack/update-all.sh | 3 +-- hack/update-staging-client-go.sh | 2 +- hack/update-staging-godeps.sh | 2 +- staging/src/k8s.io/apimachinery/Godeps/Godeps.json | 2 +- staging/src/k8s.io/apiserver/Godeps/Godeps.json | 4 ++-- staging/src/k8s.io/client-go/Godeps/Godeps.json | 2 +- staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json | 4 ++-- staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 872965b995715..b6f7341092660 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/kubernetes", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "github.com/ugorji/go/codec/codecgen", "github.com/onsi/ginkgo/ginkgo", @@ -16,7 +16,7 @@ { "ImportPath": "bitbucket.org/ww/goautoneg", "Comment": "null-5", - "Rev": "'75cd24fc2f2c2a2088577d12123ddee5f54e0675'" + "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" }, { "ImportPath": "cloud.google.com/go/compute/metadata", diff --git a/hack/godep-save.sh b/hack/godep-save.sh index cc509be7e93e4..20b3baf0ffb6d 100755 --- a/hack/godep-save.sh +++ b/hack/godep-save.sh @@ -22,7 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" source "${KUBE_ROOT}/hack/lib/util.sh" -kube::util::ensure_godep_version v74 +kube::util::ensure_godep_version v79 # Some things we want in godeps aren't code dependencies, so ./... # won't pick them up. diff --git a/hack/lib/util.sh b/hack/lib/util.sh index df72e0b82a0f3..6a0386a3415ed 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -469,7 +469,8 @@ kube::util::ensure_clean_working_dir() { # Ensure that the given godep version is installed and in the path kube::util::ensure_godep_version() { - if [[ "$(godep version)" == *"godep ${1}"* ]]; then + GODEP_VERSION=${1:-"v79"} + if [[ "$(godep version)" == *"godep ${GODEP_VERSION}"* ]]; then return fi @@ -478,7 +479,7 @@ kube::util::ensure_godep_version() { GOPATH="${KUBE_TEMP}/go" go get -d -u github.com/tools/godep 2>/dev/null pushd "${KUBE_TEMP}/go/src/github.com/tools/godep" >/dev/null - git checkout "${1:-v74}" + git checkout "${GODEP_VERSION}" GOPATH="${KUBE_TEMP}/go" go install . popd >/dev/null diff --git a/hack/update-all.sh b/hack/update-all.sh index e14bf72f96498..7e4d1306553e4 100755 --- a/hack/update-all.sh +++ b/hack/update-all.sh @@ -54,7 +54,7 @@ if ! $ALL ; then echo "Running in short-circuit mode; run with -a to force all scripts to run." fi -kube::util::ensure_godep_version v74 +kube::util::ensure_godep_version v79 if ! kube::util::godep_restored 2>&1 | sed 's/^/ /'; then echo "Running godep restore" @@ -95,4 +95,3 @@ for t in $BASH_TARGETS; do done echo -e "${color_green}Update scripts completed successfully${color_norm}" - diff --git a/hack/update-staging-client-go.sh b/hack/update-staging-client-go.sh index a723c37b810a2..5ac6b80ac052e 100755 --- a/hack/update-staging-client-go.sh +++ b/hack/update-staging-client-go.sh @@ -22,7 +22,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/hack/lib/util.sh" kube::util::ensure_clean_working_dir -kube::util::ensure_godep_version v74 +kube::util::ensure_godep_version v79 cd ${KUBE_ROOT} diff --git a/hack/update-staging-godeps.sh b/hack/update-staging-godeps.sh index aad1c92803ee0..94f7a6b19010a 100755 --- a/hack/update-staging-godeps.sh +++ b/hack/update-staging-godeps.sh @@ -56,7 +56,7 @@ if ! kube::util::godep_restored 2>&1 | sed 's/^/ /'; then fi kube::util::ensure-temp-dir -kube::util::ensure_godep_version v74 +kube::util::ensure_godep_version v79 TMP_GOPATH="${KUBE_TEMP}/go" diff --git a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json index f591561b0e809..8a315a8279d16 100644 --- a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json +++ b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apimachinery", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 995217093889c..bc2700c44d314 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -1,14 +1,14 @@ { "ImportPath": "k8s.io/apiserver", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "./..." ], "Deps": [ { "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "'75cd24fc2f2c2a2088577d12123ddee5f54e0675'" + "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" }, { "ImportPath": "github.com/PuerkitoBio/purell", diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index 49458bdd3797d..71471f32edb74 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/client-go", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "./..." ], diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index c8bb828e7ebb7..e2c8d7e896a0a 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -1,14 +1,14 @@ { "ImportPath": "k8s.io/kube-aggregator", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "./..." ], "Deps": [ { "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "'75cd24fc2f2c2a2088577d12123ddee5f54e0675'" + "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" }, { "ImportPath": "github.com/PuerkitoBio/purell", diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index a55dce8e089fa..100a56ae30de0 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -1,14 +1,14 @@ { "ImportPath": "k8s.io/sample-apiserver", "GoVersion": "go1.7", - "GodepVersion": "v74", + "GodepVersion": "v79", "Packages": [ "./..." ], "Deps": [ { "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "'75cd24fc2f2c2a2088577d12123ddee5f54e0675'" + "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" }, { "ImportPath": "github.com/PuerkitoBio/purell", From 4d85a54027c317e4c41661ed4c6d9d284ca683fe Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Mon, 13 Mar 2017 20:34:16 -0700 Subject: [PATCH 2/2] 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 4632fcca59139..c1259a4896a51 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."