Skip to content

Commit b57387b

Browse files
authored
Merge pull request kubernetes#76767 from SataQiu/fix-shellcheck-20190418
Fix shellcheck failures of hack/verify-openapi-spec.sh
2 parents 716344f + b4bc5cb commit b57387b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

hack/.shellcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
./hack/verify-codegen.sh
4343
./hack/verify-golint.sh
4444
./hack/verify-no-vendor-cycles.sh
45-
./hack/verify-openapi-spec.sh
4645
./hack/verify-test-featuregates.sh
4746
./test/cmd/apply.sh
4847
./test/cmd/apps.sh

hack/verify-openapi-spec.sh

Lines changed: 5 additions & 5 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::golang::setup_env
@@ -32,10 +32,10 @@ _tmp="${KUBE_ROOT}/_tmp"
3232

3333
mkdir -p "${_tmp}"
3434
cp -a "${SPECROOT}" "${TMP_SPECROOT}"
35-
trap "cp -a ${TMP_SPECROOT} ${SPECROOT}/..; rm -rf ${_tmp}" EXIT SIGINT
36-
rm ${SPECROOT}/*
37-
cp ${TMP_SPECROOT}/BUILD ${SPECROOT}/BUILD
38-
cp ${TMP_SPECROOT}/README.md ${SPECROOT}/README.md
35+
trap 'cp -a "${TMP_SPECROOT}" "${SPECROOT}"/..; rm -rf "${_tmp}"' EXIT SIGINT
36+
rm "${SPECROOT}"/*
37+
cp "${TMP_SPECROOT}/BUILD" "${SPECROOT}/BUILD"
38+
cp "${TMP_SPECROOT}/README.md" "${SPECROOT}/README.md"
3939

4040
"${KUBE_ROOT}/hack/update-openapi-spec.sh"
4141
echo "diffing ${SPECROOT} against freshly generated openapi spec"

0 commit comments

Comments
 (0)