You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be more robust to use the release tag to get the download url rather than expect the pkg name to be in a certain format. Then if I have a lapse in memory and use a different filename things won't break and you only need the tag to get whatever the download url is (or no tag to just get the latest)
The following will work to get either the latest release or a specific tag:
getDownloadURL() {
url="https://api.github.com/repos/swiftDialog/swiftDialog/releases"
header="Accept: application/json"
tag=${1:-"$(curl -sL -H "${header}"${url}/latest | awk -F '"''/tag_name/ { print $4; exit }')"}
curl -sL -H "${header}"${url}/tags/${tag}| awk -F '"''/browser_download_url/ { print $4; exit }'
}
# URL for downloading the latest swiftDialog release
dialog_download_url=$(getDownloadURL)echo"download url for latest : ${dialog_download_url}"# URL for downloading swiftDialog (with tag version)# This ensures a compatible swiftDialog version is used if not using the package installer
swiftdialog_tag_required="v2.4.2"
dialog_download_url=$(getDownloadURL "${swiftdialog_tag_required}")echo"download url for tag version : ${dialog_download_url}"# URL for downloading swiftDialog on macOS 11 (with tag version)# This ensures a compatible swiftDialog version is used if not using the package installer
swiftdialog_bigsur_tag_required="v2.2.1"
dialog_bigsur_download_url=$(getDownloadURL "${swiftdialog_bigsur_tag_required}")echo"download url for big sur supported version: ${dialog_bigsur_download_url}"
Do note that unauthenticated access to the github api is limited to 60 requests per hour per client.
The text was updated successfully, but these errors were encountered:
Regarding this block of code:
erase-install/erase-install.sh
Lines 59 to 67 in 515128a
It would be more robust to use the release tag to get the download url rather than expect the pkg name to be in a certain format. Then if I have a lapse in memory and use a different filename things won't break and you only need the tag to get whatever the download url is (or no tag to just get the latest)
The following will work to get either the latest release or a specific tag:
Do note that unauthenticated access to the github api is limited to 60 requests per hour per client.
The text was updated successfully, but these errors were encountered: