Merge pull request #75865 from xichengliudui/fixshellcheckfailure-03

Fix shellcheck failures in godep-save.sh and godep-restore.sh
k3s-v1.15.3
Kubernetes Prow Robot 2019-03-30 15:57:08 -07:00 committed by GitHub
commit 72418519ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -26,8 +26,6 @@
./cluster/validate-cluster.sh
./hack/cherry_pick_pull.sh
./hack/ginkgo-e2e.sh
./hack/godep-restore.sh
./hack/godep-save.sh
./hack/grab-profiles.sh
./hack/jenkins/benchmark-dockerized.sh
./hack/jenkins/build.sh

View File

@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
kube::log::status "Restoring kubernetes godeps"

View File

@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
kube::log::status "Ensuring prereqs"
@ -88,11 +88,12 @@ kube::log::status "Running godep save - this might take a while"
# This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be
# realpath'ed, and godep barfs ("... is not using a known version control
# system") on our staging dirs.
GOPATH="${GOPATH}:$(pwd)/staging" ${KUBE_GODEP:?} save -i $(IFS=,; echo "${IGNORED_PACKAGES[*]}") "${REQUIRED_BINS[@]}"
GOPATH="${GOPATH}:$(pwd)/staging" "${KUBE_GODEP:?}" save -i "$(IFS=,; echo "${IGNORED_PACKAGES[*]}")" "${REQUIRED_BINS[@]}"
# create a symlink in vendor directory pointing to the staging client. This
# let other packages use the staging client as if it were vendored.
for repo in $(ls staging/src/k8s.io); do
for repo in staging/src/k8s.io/*; do
repo="${repo#staging/src/k8s.io/}"
if [ ! -e "vendor/k8s.io/${repo}" ]; then
ln -s "../../staging/src/k8s.io/${repo}" "vendor/k8s.io/${repo}"
fi