Restored support for downloading specific versions (#528)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2025-06-15 10:02:54 -05:00
1 parent 406ac6d773
commit c738466cd8
1 file changed
+6 -2
+6 -2
View File
@@ -23,8 +23,7 @@ function replace_version_in_url() {
function lookupVersion() { function lookupVersion() {
platform=${1:?Missing required platform indicator} platform=${1:?Missing required platform indicator}
# TODO need to find out API call to lookup custom version customVersion=${2:-}
# customVersion=${2:-}
DOWNLOAD_URL=$( DOWNLOAD_URL=$(
curl -fsSL "${getUrlPage}" | curl -fsSL "${getUrlPage}" |
@@ -48,6 +47,11 @@ function lookupVersion() {
' '
) )
if [[ -n "${customVersion}" && -n "${DOWNLOAD_URL}" ]]; then
DOWNLOAD_URL=$(replace_version_in_url "${DOWNLOAD_URL}" "${customVersion}")
return
fi
# shellcheck disable=SC2012 # shellcheck disable=SC2012
if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then if [[ ${DOWNLOAD_URL} =~ http.*/.*-(.*)\.zip ]]; then
VERSION=${BASH_REMATCH[1]} VERSION=${BASH_REMATCH[1]}