diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index cd212f0f05..c816ec8575 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -18,6 +18,24 @@ set -o errexit set -o nounset set -o pipefail +#### HACK #### +# Sometimes godep just can't handle things. This lets use manually put +# some deps in place first, so godep won't fall over. +preload-dep() { + org="$1" + project="$2" + sha="$3" + + org_dir="${GOPATH}/src/${org}" + mkdir -p "${org_dir}" + pushd "${org_dir}" > /dev/null + git clone "https://${org}/${project}.git" > /dev/null 2>&1 + pushd "${org_dir}/${project}" > /dev/null + git checkout "${sha}" > /dev/null 2>&1 + popd > /dev/null + popd > /dev/null +} + KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" @@ -43,6 +61,11 @@ GODEP="${_tmpdir}/bin/godep" # fill out that nice clean place with the kube godeps echo "Starting to download all kubernetes godeps. This takes a while" + +# github.com/prometheus/client_golang removed the model and extraction directory. +# thus go get fails and thus godep fails. So load it by hand. +preload-dep "github.com/prometheus" "client_golang" "692492e54b553a81013254cc1fba4b6dd76fad30" + "${GODEP}" restore echo "Download finished"