-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update env var for runtime version (#530)
* ci: update env var for runtime version * Update bin/update-proxy-versions.sh Co-authored-by: Enno Runne <[email protected]> * safer version and update file name * run from root folder --------- Co-authored-by: Enno Runne <[email protected]>
- Loading branch information
Showing
1 changed file
with
8 additions
and
10 deletions.
There are no files selected for viewing
18 changes: 8 additions & 10 deletions
18
bin/update-proxy-versions.sh → bin/update-runtime-versions.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |