From 2259c5270f3d53315daf5a5eaa91e9826dd4e11c Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Tue, 21 Jan 2025 07:17:18 -0500 Subject: [PATCH] Fix unset-var bug in 'verify_all.sh' script A variable 'artifact' was being referenced outside of the for-in loop that created it. Fixes that bug. --- hack/release/smoke_test/verify_all.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hack/release/smoke_test/verify_all.sh b/hack/release/smoke_test/verify_all.sh index 89f559bf..38c6ddec 100755 --- a/hack/release/smoke_test/verify_all.sh +++ b/hack/release/smoke_test/verify_all.sh @@ -112,12 +112,11 @@ echo "Download all artifacts and verify signatures" gpg --verify "${artifact}.asc" "${artifact}" \ || { echo "Invalid signature for ${artifact}. Aborting!"; exit 1; } fi + # If a helm chart has a provenance file, and a GPG Key was provided, then verify the provenance file + if [[ -f "${artifact}.prov" && -n "${GPG_KEY:-}" ]]; then + helm verify "${artifact}" + fi done - - # If a helm chart has a provenance file, and a GPG Key was provided, then verify the provenance file - if [[ -f "${artifact}.prov" && -n "${GPG_KEY:-}" ]]; then - helm verify "${artifact}" - fi ) done