Skip to content

Commit

Permalink
safer version and update file name
Browse files Browse the repository at this point in the history
  • Loading branch information
efgpinto committed Dec 21, 2023
1 parent 445d289 commit a5d86ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json

This file was deleted.

10 changes: 5 additions & 5 deletions bin/update-proxy-versions.sh → bin/update-runtime-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
# to facilitate the update of all the places where we usually depend on the latest version

# provide the new Kalix Runtime version you want the project to be updated to
if [[ -z "$RUNTIME_VERSION" ]]; then
if [[ -z "${RUNTIME_VERSION}" ]]; then
echo "Must provide RUNTIME_VERSION in environment" 1>&2
exit 1
fi

cd ..

echo ">>> Updating docker image versions to $RUNTIME_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:$RUNTIME_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:$RUNTIME_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\": \"$RUNTIME_VERSION\"/" ./sdk/config.json
sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"${RUNTIME_VERSION}\"/" ./sdk/config.json
rm ./sdk/config.json.bak

0 comments on commit a5d86ce

Please sign in to comment.