Merge pull request #74333 from SataQiu/fix-shell-20190221

Fix some shellcheck failures in hack
This commit is contained in:
Kubernetes Prow Robot 2019-03-21 22:50:18 -07:00 committed by GitHub
commit 51b5d28c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 12 deletions

View File

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

View File

@ -19,5 +19,5 @@ set -o errexit
set -o nounset set -o nounset
set -o pipefail 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 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 nounset
set -o pipefail set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
# For help output # For help output
ARGHELP="" ARGHELP=""
if [[ "$#" -gt 0 ]]; then if [[ "$#" -gt 0 ]]; then
ARGHELP="WHAT='$@'" ARGHELP="WHAT='$*'"
fi 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,7 @@ set -o errexit
set -o nounset set -o nounset
set -o pipefail set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
staging_repos=($(ls "${KUBE_ROOT}/staging/src/k8s.io/"))
expected_filenames=( expected_filenames=(
.github/PULL_REQUEST_TEMPLATE.md .github/PULL_REQUEST_TEMPLATE.md
@ -36,8 +34,9 @@ exceptions=(
) )
RESULT=0 RESULT=0
for repo in ${staging_repos[@]}; do for full_repo_path in "${KUBE_ROOT}"/staging/src/k8s.io/*; do
for filename in ${expected_filenames[@]}; do repo=$(basename "${full_repo_path}")
for filename in "${expected_filenames[@]}"; do
if echo " ${exceptions[*]} " | grep -F " ${repo}/${filename} " >/dev/null; then if echo " ${exceptions[*]} " | grep -F " ${repo}/${filename} " >/dev/null; then
continue continue
elif [ ! -f "${KUBE_ROOT}/staging/src/k8s.io/${repo}/${filename}" ]; then elif [ ! -f "${KUBE_ROOT}/staging/src/k8s.io/${repo}/${filename}" ]; then