From a744545a93bae1fc473cca6d43a36d1113e618e5 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Wed, 24 Jan 2024 19:19:27 -0500 Subject: [PATCH] CI: allow for using variable `version` in auto update scripts as an alternative to `webVer` this makes creating auto update scripts easier as the test urls no longer need to be modified with a different variable name from the ones used in actual scripts --- .github/workflows/update_github_script.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/update_github_script.sh b/.github/workflows/update_github_script.sh index 3823686be4..a750917856 100755 --- a/.github/workflows/update_github_script.sh +++ b/.github/workflows/update_github_script.sh @@ -22,6 +22,11 @@ # webVer=$(get_release subhra74/xdm) # all_url="https://github.com/subhra74/xdm/releases/download/${webVer}/xdm-setup-${webVer}.tar.xz" +# alternatively, this script also supports using the variable "version" instead of "webVer" +if [ -n "$version" ]; then +webVer=("${version[@]}") +fi + # make sure webVer variable is supplied by the sourcing script if [ -n "$webVer" ]; then #iterate through all webVer supplied if an array @@ -162,6 +167,7 @@ echo '![badge-issue][badge-issue]'" webVer variable is missing for $app_name upd fi unset webVer +unset version unset pi_apps_ver_32 unset pi_apps_ver_64 unset pi_apps_ver