diff --git a/bin/update-proxy-versions.sh b/bin/update-runtime-versions.sh similarity index 57% rename from bin/update-proxy-versions.sh rename to bin/update-runtime-versions.sh index 20ec140e..7902ae7f 100755 --- a/bin/update-proxy-versions.sh +++ b/bin/update-runtime-versions.sh @@ -1,32 +1,30 @@ #!/usr/bin/env bash # USAGE: -# > PROXY_VERSION=1.0.31 ./update-proxy-versions.sh +# > RUNTIME_VERSION=1.0.31 ./bin/update-proxy-versions.sh # this script is meant to be used after a new Proxy version is out # to facilitate the update of all the places where we usually depend on the latest version -# provide the new proxy version you want the project to be updated to -if [[ -z "$PROXY_VERSION" ]]; then - echo "Must provide PROXY_VERSION in environment" 1>&2 +# provide the new Kalix Runtime version you want the project to be updated to +if [[ -z "${RUNTIME_VERSION}" ]]; then + echo "Must provide RUNTIME_VERSION in environment" 1>&2 exit 1 fi -cd .. - -echo ">>> Updating docker image versions to $PROXY_VERSION" +echo ">>> Updating docker image versions to ${RUNTIME_VERSION}" PROJS=$(find . -type f -name "docker-compose.yml") for i in ${PROJS[@]} do echo "Updating Dockerfile for: $i" - sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)/gcr.io\/kalix-public\/kalix-runtime:$PROXY_VERSION/" $i + sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)/gcr.io\/kalix-public\/kalix-runtime:${RUNTIME_VERSION}/" $i rm $i.bak done echo ">>> Updating application.conf" -sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)\"/gcr.io\/kalix-public\/kalix-runtime:$PROXY_VERSION\"/" ./codegen/js-gen-cli/src/it/resources/application.conf +sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)\"/gcr.io\/kalix-public\/kalix-runtime:${RUNTIME_VERSION}\"/" ./codegen/js-gen-cli/src/it/resources/application.conf rm ./codegen/js-gen-cli/src/it/resources/application.conf.bak echo ">>> Updating config.json" -sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"$PROXY_VERSION\"/" ./sdk/config.json +sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"${RUNTIME_VERSION}\"/" ./sdk/config.json rm ./sdk/config.json.bak