Skip to content

Commit

Permalink
Upgrade yq
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
  • Loading branch information
dhaiducek committed Oct 18, 2023
1 parent 9f3dc92 commit 6e77243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hack/verify-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 6e77243

Please sign in to comment.