]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Simpler assets lister
authorSergey Matveev <stargrave@stargrave.org>
Mon, 29 May 2023 12:13:36 +0000 (15:13 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 29 May 2023 12:13:36 +0000 (15:13 +0300)
link-for/bin/link-for-github-release

index 9d3257868617ad93a254388acbcef4a6ee0ee96f..0f6f117ebdbf9ffa77272cb04984dd76a830030b 100755 (executable)
@@ -1,6 +1,4 @@
 #!/bin/sh
 
-account=$1
-project=$2
-tag=$3
-echo https://github.com/$account/$project/releases/download/$tag/$project-${tag#v}.tar.gz
+curl https://api.github.com/repos/${1}/${2}/releases |
+gojq -r ".[] | .assets[] | .browser_download_url"