diff --git a/scripts/src/main/resources/scripts/command/docker b/scripts/src/main/resources/scripts/command/docker index 2b9bd496b..73130da39 100755 --- a/scripts/src/main/resources/scripts/command/docker +++ b/scripts/src/main/resources/scripts/command/docker @@ -40,19 +40,18 @@ function doSetup() { fi else doRequireNotBatch - local latestversion - latestversion=$(curl -Ls -o /dev/null -w '%{url_effective}' https://github.com/rancher-sandbox/rancher-desktop/releases/latest | sed 's/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/') - local previousversion="1.2.1" - if [[ "${latestversion}" =~ ^[0-9]\.[0-9].[0-9]$ ]] - then - if [ "${latestversion}" \> "${previousversion}" ] + local version="${RANCHER_VERSION}" + if [ -z "${version}" ] + then + version=1.3.0 + latestversion=$(curl -Ls -o /dev/null -w '%{url_effective}' https://github.com/rancher-sandbox/rancher-desktop/releases/latest | sed 's/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/') + doVersionCompare "${latestversion}" "${version}" + VersCompRes=${?} + if [ "${VersCompRes}" = 1 ] then - doEcho "setting RANCHER_VERSION" - RANCHER_VERSION=${latestversion} - doEcho "RANCHER_VERSION is ${RANCHER_VERSION}" + version=${latestversion} fi fi - local version="${RANCHER_VERSION:-1.2.1}" local code #to download Rancher Desktop we need a bit more work compared to Docker-Desktop #as the download-URL isn't well structured