Skip to content

Commit 9ef22df

Browse files
authored
Merge pull request #379 from gm3dmo/issue378
Improve release-asset.sh script
2 parents 3e0a249 + aebec9b commit 9ef22df

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

list-release-assets.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
# GET /repos/{owner}/{repo}/releases/{release_id}/assets
55

66

7-
release_id=${1:-1}
7+
# If the script is passed an argument $1 use that as the name
8+
if [ -z "$1" ]
9+
then
10+
#release_id=$(./list-releases.sh | jq -r '.[] |.id | max')
11+
release_id=$(./list-releases.sh | jq '[.[].id] | max')
12+
else
13+
release_id=$1
14+
fi
15+
816

917
curl ${curl_custom_flags} \
1018
-H "Accept: application/vnd.github.v3+json" \

0 commit comments

Comments
 (0)