mirror of
https://code.forgejo.org/actions/forgejo-release.git
synced 2025-04-24 18:02:15 +00:00
refactor: Clarify why name
is read out last from assets.json
This commit is contained in:
parent
50f803ce6a
commit
4308ed0075
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ download() {
|
||||||
echo "Downloading tagged release ${TAG}"
|
echo "Downloading tagged release ${TAG}"
|
||||||
api GET repos/$REPO/releases/tags/"$TAG" > "$TMP_DIR"/assets.json
|
api GET repos/$REPO/releases/tags/"$TAG" > "$TMP_DIR"/assets.json
|
||||||
fi
|
fi
|
||||||
jq --raw-output '.assets[] | "\(.browser_download_url) \(.name)"' < "$TMP_DIR"/assets.json | while read url name ; do
|
jq --raw-output '.assets[] | "\(.browser_download_url) \(.name)"' < "$TMP_DIR"/assets.json | while read url name ; do # `name` may contain whitespace, therefore, it must be last
|
||||||
curl --fail -H "Authorization: token $TOKEN" -o "$name" -L "$url"
|
curl --fail -H "Authorization: token $TOKEN" -o "$name" -L "$url"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue