Skip to content

Commit f828702

Browse files
committed
Fix shellcheck failures in godep-save.sh and godep-restore.sh
update pull request update pull request
1 parent b1829df commit f828702

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

hack/.shellcheck_failures

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
./cluster/validate-cluster.sh
2727
./hack/cherry_pick_pull.sh
2828
./hack/ginkgo-e2e.sh
29-
./hack/godep-restore.sh
30-
./hack/godep-save.sh
3129
./hack/grab-profiles.sh
3230
./hack/jenkins/benchmark-dockerized.sh
3331
./hack/jenkins/build.sh

hack/godep-restore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222
source "${KUBE_ROOT}/hack/lib/init.sh"
2323

2424
kube::log::status "Restoring kubernetes godeps"

hack/godep-save.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2222
source "${KUBE_ROOT}/hack/lib/init.sh"
2323

2424
kube::log::status "Ensuring prereqs"
@@ -88,11 +88,12 @@ kube::log::status "Running godep save - this might take a while"
8888
# This uses $(pwd) rather than ${KUBE_ROOT} because KUBE_ROOT will be
8989
# realpath'ed, and godep barfs ("... is not using a known version control
9090
# system") on our staging dirs.
91-
GOPATH="${GOPATH}:$(pwd)/staging" ${KUBE_GODEP:?} save -i $(IFS=,; echo "${IGNORED_PACKAGES[*]}") "${REQUIRED_BINS[@]}"
91+
GOPATH="${GOPATH}:$(pwd)/staging" "${KUBE_GODEP:?}" save -i "$(IFS=,; echo "${IGNORED_PACKAGES[*]}")" "${REQUIRED_BINS[@]}"
9292

9393
# create a symlink in vendor directory pointing to the staging client. This
9494
# let other packages use the staging client as if it were vendored.
95-
for repo in $(ls staging/src/k8s.io); do
95+
for repo in staging/src/k8s.io/*; do
96+
repo="${repo#staging/src/k8s.io/}"
9697
if [ ! -e "vendor/k8s.io/${repo}" ]; then
9798
ln -s "../../staging/src/k8s.io/${repo}" "vendor/k8s.io/${repo}"
9899
fi

0 commit comments

Comments
 (0)