Merge pull request #115069 from alexzielenski/grep-null

use --null instead of -Z in grep invocation
This commit is contained in:
Kubernetes Prow Robot 2023-01-15 07:30:42 -08:00 committed by GitHub
commit da6a8e3fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ function codegen::prerelease() {
fi
local tag_dirs=()
kube::util::read-array tag_dirs < <( \
grep -l -Z --color=never '+k8s:prerelease-lifecycle-gen=true' "${ALL_K8S_TAG_FILES[@]}" \
grep -l --null --color=never '+k8s:prerelease-lifecycle-gen=true' "${ALL_K8S_TAG_FILES[@]}" \
| xargs -0 -n1 dirname \
| LC_ALL=C sort -u)
if [[ "${DBG_CODEGEN}" == 1 ]]; then
@ -189,7 +189,7 @@ function codegen::deepcopy() {
fi
local tag_dirs=()
kube::util::read-array tag_dirs < <( \
grep -l -Z --color=never '+k8s:deepcopy-gen=' "${ALL_K8S_TAG_FILES[@]}" \
grep -l --null --color=never '+k8s:deepcopy-gen=' "${ALL_K8S_TAG_FILES[@]}" \
| xargs -0 -n1 dirname \
| LC_ALL=C sort -u)
if [[ "${DBG_CODEGEN}" == 1 ]]; then
@ -255,7 +255,7 @@ function codegen::defaults() {
fi
local tag_dirs=()
kube::util::read-array tag_dirs < <( \
grep -l -Z --color=never '+k8s:defaulter-gen=' "${ALL_K8S_TAG_FILES[@]}" \
grep -l --null --color=never '+k8s:defaulter-gen=' "${ALL_K8S_TAG_FILES[@]}" \
| xargs -0 -n1 dirname \
| LC_ALL=C sort -u)
if [[ "${DBG_CODEGEN}" == 1 ]]; then
@ -326,7 +326,7 @@ function codegen::conversions() {
fi
local tag_dirs=()
kube::util::read-array tag_dirs < <(\
grep -l -Z --color=never '^// *+k8s:conversion-gen=' "${ALL_K8S_TAG_FILES[@]}" \
grep -l --null --color=never '^// *+k8s:conversion-gen=' "${ALL_K8S_TAG_FILES[@]}" \
| xargs -0 -n1 dirname \
| LC_ALL=C sort -u)
if [[ "${DBG_CODEGEN}" == 1 ]]; then
@ -536,7 +536,7 @@ function codegen::openapi() {
local tag_dirs=()
kube::util::read-array tag_dirs < <(
grep -l -Z --color=never '+k8s:openapi-gen=' $(indirect_array "${prefix}_tag_files") \
grep -l --null --color=never '+k8s:openapi-gen=' $(indirect_array "${prefix}_tag_files") \
| xargs -0 -n1 dirname \
| LC_ALL=C sort -u)