File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1735,12 +1735,13 @@ function fetch_and_deploy_gh_release() {
17351735
17361736 # ## Tarball Mode ###
17371737 if [[ " $mode " == " tarball" || " $mode " == " source" ]]; then
1738- url=$( echo " $json " | jq -r ' .tarball_url // empty' )
1739- [[ -z " $url " ]] && url=" https://github.com/$repo /archive/refs/tags/v$version .tar.gz"
1738+ # GitHub API's tarball_url/zipball_url can return HTTP 300 Multiple Choices
1739+ # when a branch and tag share the same name. Use explicit refs/tags/ URL instead.
1740+ local direct_tarball_url=" https://github.com/$repo /archive/refs/tags/$tag_name .tar.gz"
17401741 filename=" ${app_lc} -${version} .tar.gz"
17411742
1742- curl $download_timeout -fsSL -o " $tmpdir /$filename " " $url " || {
1743- msg_error " Download failed: $url "
1743+ curl $download_timeout -fsSL -o " $tmpdir /$filename " " $direct_tarball_url " || {
1744+ msg_error " Download failed: $direct_tarball_url "
17441745 rm -rf " $tmpdir "
17451746 return 1
17461747 }
You can’t perform that action at this time.
0 commit comments