mirror of https://github.com/k3s-io/k3s
Merge pull request #76843 from xichengliudui/fixshellcheckfailures-27
Fix shellcheck failures on verify-readonly-packages.shk3s-v1.15.3
commit
746fea0428
|
@ -47,7 +47,6 @@
|
|||
./hack/verify-golint.sh
|
||||
./hack/verify-no-vendor-cycles.sh
|
||||
./hack/verify-openapi-spec.sh
|
||||
./hack/verify-readonly-packages.sh
|
||||
./hack/verify-test-featuregates.sh
|
||||
./test/cmd/apply.sh
|
||||
./test/cmd/apps.sh
|
||||
|
|
|
@ -22,7 +22,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"
|
||||
|
||||
readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
|
||||
|
@ -44,12 +44,17 @@ find_files() {
|
|||
}
|
||||
|
||||
IFS=$'\n'
|
||||
conflicts=($(find_files | sed 's|/.readonly||' | while read dir; do
|
||||
|
||||
conflicts=()
|
||||
while IFS=$'\n' read -r line; do
|
||||
conflicts+=( "$line" )
|
||||
done < <(find_files | sed 's|/.readonly||' | while read -r dir; do
|
||||
dir=${dir#./}
|
||||
if kube::util::has_changes "${branch}" "^${dir}/[^/]*\$" '/\.readonly$|/BUILD$|/zz_generated|/\.generated\.|\.proto$|\.pb\.go$' >/dev/null; then
|
||||
echo "${dir}"
|
||||
fi
|
||||
done))
|
||||
done)
|
||||
|
||||
unset IFS
|
||||
|
||||
if [ ${#conflicts[@]} -gt 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue