diff --git a/hack/verify-crds.sh b/hack/verify-crds.sh index 5db181ede..e1972f646 100755 --- a/hack/verify-crds.sh +++ b/hack/verify-crds.sh @@ -2,7 +2,7 @@ if [ ! -f ./_output/tools/bin/yq ]; then mkdir -p ./_output/tools/bin - curl -s -f -L https://github.com/mikefarah/yq/releases/download/2.4.0/yq_$(go env GOHOSTOS)_$(go env GOHOSTARCH) -o ./_output/tools/bin/yq + curl -s -f -L https://github.com/mikefarah/yq/releases/download/v4.35.2/yq_$(go env GOHOSTOS)_$(go env GOHOSTARCH) -o ./_output/tools/bin/yq chmod +x ./_output/tools/bin/yq fi @@ -19,12 +19,12 @@ addon/v1alpha1/*.crd.yaml FAILS=false for f in $FILES do - if [[ $(./_output/tools/bin/yq r $f spec.validation.openAPIV3Schema.properties.metadata.description) != "null" ]]; then + if [[ $(./_output/tools/bin/yq .spec.validation.openAPIV3Schema.properties.metadata.description $f) != "null" ]]; then echo "Error: cannot have a metadata description in $f" FAILS=true fi - if [[ $(./_output/tools/bin/yq r $f spec.preserveUnknownFields) != "false" ]]; then + if [[ $(./_output/tools/bin/yq .spec.preserveUnknownFields $f) != "false" ]]; then echo "Error: pruning not enabled (spec.preserveUnknownFields != false) in $f" FAILS=true fi