Skip to content

Commit

Permalink
Fix validations script to loop over all required annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsakala committed Jul 12, 2023
1 parent 490a825 commit d855b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/release-validation/validate-annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git fetch ${UPSTREAM_REMOTE}

# may need to use parenthesis instead of double quotes in some systems for it to work as an array
# requiredAnnotations="catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os"
requiredAnnotations=(catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os)
declare -a requiredAnnotations=(catalog.cattle.io/rancher-version catalog.cattle.io/kube-version catalog.cattle.io/permits-os)

for asset in $(find $ASSETS_DIR -mindepth 2 -maxdepth 2 -name "*.tgz" | sort | xargs); do
if printf '%s\n' "${exclude[@]}" | grep -F -x ${asset} 1>/dev/null; then
Expand Down Expand Up @@ -62,7 +62,7 @@ for asset in $(find $ASSETS_DIR -mindepth 2 -maxdepth 2 -name "*.tgz" | sort | x
if [[ ${key} != "annotations" ]]; then
continue
fi
for requiredAnnotation in $requiredAnnotations; do
for requiredAnnotation in "${requiredAnnotations[@]}"; do
if echo ${chartContent} | grep "catalog.cattle.io/hidden" 1>/dev/null; then
echo "Skipping checking annotation on chart with hidden annotation ${chart}"
break
Expand Down

0 comments on commit d855b0e

Please sign in to comment.