From 606acffbf354d2ae6487462925586bfb9bbfe4f2 Mon Sep 17 00:00:00 2001 From: Renato Cavalcanti Date: Thu, 28 Nov 2024 14:24:21 +0100 Subject: [PATCH] chore: pass runtime version as arg (#43) --- updateRuntimeVersions.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/updateRuntimeVersions.sh b/updateRuntimeVersions.sh index 1f5e3c7b7..36e52ebc2 100755 --- a/updateRuntimeVersions.sh +++ b/updateRuntimeVersions.sh @@ -1,14 +1,21 @@ #!/usr/bin/env bash # USAGE: +# > ./updateRuntimeVersions.sh 1.0.31 +# or # > RUNTIME_VERSION=1.0.31 ./updateRuntimeVersions.sh # this script is meant to be used after a new Runtime version is out # to facilitate the update of all the places where we usually depend on the latest version # provide the new Runtime version you want the project to be updated to -if [[ -z "$RUNTIME_VERSION" ]]; then - echo "Must provide RUNTIME_VERSION in environment" 1>&2 + +if [[ $1 ]];then + RUNTIME_VERSION=$1 +fi + +if [[ -z "$RUNTIME_VERSION" ]]; then + echo "Must provide RUNTIME_VERSION in environment or pass it as an argument" 1>&2 exit 1 fi