1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00

scripts/update-gh-pages: fix helm repo update

Whitespace in release metadata json was not correctly handled.
This commit is contained in:
Markus Lehtonen 2021-03-18 11:04:03 +02:00
parent c7442f81b0
commit 6541e3bb55

View file

@ -37,9 +37,11 @@ update_helm_repo_index() {
releases="`curl -sSf -H 'Accept: application/vnd.github.v3+json' \ releases="`curl -sSf -H 'Accept: application/vnd.github.v3+json' \
$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases | jq -c '.[]'`" $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 # 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 for asset_meta in `echo $assets | jq -c '.[]'`; do
# Set fields we're interested in as "asset_<field>" shell variables # Set fields we're interested in as "asset_<field>" shell variables