fix: don't loop when there is no assets in the tag (#837)

This commit is contained in:
Baptiste Augrain 2021-09-12 00:51:25 +02:00 committed by GitHub
parent a6da364b3c
commit ef1ce60ad8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ set -e
REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}"
GITHUB_RESPONSE=$( curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/$REPOSITORY/releases/tags/$MS_TAG)
VSCODIUM_ASSETS=$( echo $GITHUB_RESPONSE | jq -c '.assets | map(.name)' )
VSCODIUM_ASSETS=$( echo $GITHUB_RESPONSE | jq -c '.assets | map(.name)?' )
contains() {
# add " to match the end of a string so any hashs won't be matched by mistake