fix some shellcheck failures in hack

This commit is contained in:
SataQiu 2019-02-26 12:45:38 +08:00
parent 5a2d587ac4
commit c6ae694b79
4 changed files with 15 additions and 11 deletions

View File

@ -44,7 +44,6 @@
./hack/lib/test.sh
./hack/lib/util.sh
./hack/lib/version.sh
./hack/list-feature-tests.sh
./hack/local-up-cluster.sh
./hack/make-rules/build.sh
./hack/make-rules/clean.sh
@ -77,12 +76,10 @@
./hack/verify-codegen.sh
./hack/verify-description.sh
./hack/verify-golint.sh
./hack/verify-govet.sh
./hack/verify-import-boss.sh
./hack/verify-no-vendor-cycles.sh
./hack/verify-openapi-spec.sh
./hack/verify-readonly-packages.sh
./hack/verify-staging-meta-files.sh
./hack/verify-test-featuregates.sh
./test/cmd/apply.sh
./test/cmd/apps.sh

View File

@ -19,5 +19,5 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
grep "\[Feature:\w+\]" "${KUBE_ROOT}"/test/e2e/**/*.go -Eoh | LC_ALL=C sort -u

View File

@ -20,12 +20,19 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
# For help output
ARGHELP=""
if [[ "$#" -gt 0 ]]; then
ARGHELP="WHAT='$@'"
ARGHELP="WHAT='$*'"
fi
make --no-print-directory -C "${KUBE_ROOT}" vet WHAT="$@"
echo "NOTE: $0 has been replaced by 'make vet'"
echo
echo "The equivalent of this invocation is: "
echo " make vet ${ARGHELP}"
echo
echo
make --no-print-directory -C "${KUBE_ROOT}" vet WHAT="$*"

View File

@ -18,9 +18,9 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
staging_repos=($(ls "${KUBE_ROOT}/staging/src/k8s.io/"))
IFS=" " read -r -a staging_repos <<< "$(ls "${KUBE_ROOT}/staging/src/k8s.io/")"
expected_filenames=(
.github/PULL_REQUEST_TEMPLATE.md
@ -36,8 +36,8 @@ exceptions=(
)
RESULT=0
for repo in ${staging_repos[@]}; do
for filename in ${expected_filenames[@]}; do
for repo in "${staging_repos[@]}"; do
for filename in "${expected_filenames[@]}"; do
if echo " ${exceptions[*]} " | grep -F " ${repo}/${filename} " >/dev/null; then
continue
elif [ ! -f "${KUBE_ROOT}/staging/src/k8s.io/${repo}/${filename}" ]; then