From 6541e3bb55638ebbc959609f53662c474ba268f5 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 18 Mar 2021 11:04:03 +0200 Subject: [PATCH] scripts/update-gh-pages: fix helm repo update Whitespace in release metadata json was not correctly handled. --- scripts/github/update-gh-pages.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/github/update-gh-pages.sh b/scripts/github/update-gh-pages.sh index d7be9e2e7..a71a5d6ed 100755 --- a/scripts/github/update-gh-pages.sh +++ b/scripts/github/update-gh-pages.sh @@ -37,9 +37,11 @@ update_helm_repo_index() { releases="`curl -sSf -H 'Accept: application/vnd.github.v3+json' \ $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases | jq -c '.[]'`" - for release_meta in $releases; do + echo "$releases" | while read -r release_meta; do # Set fields we're interested in as shell variables - eval `echo $release_meta | jq -r '{tag_name, url, assets} | keys[] as $k | "\($k)='"'"'\(.[$k])'"'"'"'` + eval `echo "$release_meta" | jq -r '{tag_name, url, assets} | keys[] as $k | "\($k)='"'"'\(.[$k])'"'"'"'` + + echo "Scanning assets of release $tag_name..." for asset_meta in `echo $assets | jq -c '.[]'`; do # Set fields we're interested in as "asset_" shell variables