Add staging repos to GOPATH in verify-godeps
This commit adds the staging repos to the GOPATH in hack/verify-godeps.sh. This allows vendored librarys to depend on staging repos and not break verify-godeps. This also adds `hack/godep-restore.sh`, which acts like `godep restore`, but sets the GOPATH appropriate as well.
This commit is contained in:
parent
e9eddd9c34
commit
77069cd9ec
28
hack/godep-restore.sh
Executable file
28
hack/godep-restore.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2017 The Kubernetes Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||||
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
export GOPATH=${GOPATH}:${KUBE_ROOT}/staging
|
||||||
|
GODEP="${GODEP:-godep}"
|
||||||
|
|
||||||
|
echo "Starting to download all kubernetes godeps. This takes a while"
|
||||||
|
"${GODEP}" restore "$@"
|
||||||
|
echo "Download finished"
|
@ -39,7 +39,7 @@ cd /go/src/k8s.io/kubernetes
|
|||||||
|
|
||||||
# hack/verify-client-go.sh requires all dependencies exist in the GOPATH.
|
# hack/verify-client-go.sh requires all dependencies exist in the GOPATH.
|
||||||
# the retry helps avoid flakes while keeping total time bounded.
|
# the retry helps avoid flakes while keeping total time bounded.
|
||||||
godep restore || godep restore
|
./hack/godep-restore.sh || ./hack/godep-restore.sh
|
||||||
|
|
||||||
./hack/install-etcd.sh
|
./hack/install-etcd.sh
|
||||||
make verify
|
make verify
|
||||||
|
@ -99,6 +99,7 @@ pushd "${_kubetmp}" 2>&1 > /dev/null
|
|||||||
pin-godep 'v74'
|
pin-godep 'v74'
|
||||||
"${GODEP}" version
|
"${GODEP}" version
|
||||||
|
|
||||||
|
export GOPATH="${GOPATH}:${_kubetmp}/staging"
|
||||||
# Fill out that nice clean place with the kube godeps
|
# Fill out that nice clean place with the kube godeps
|
||||||
echo "Starting to download all kubernetes godeps. This takes a while"
|
echo "Starting to download all kubernetes godeps. This takes a while"
|
||||||
"${GODEP}" restore
|
"${GODEP}" restore
|
||||||
|
Loading…
Reference in New Issue
Block a user