Created
April 24, 2024 23:24
-
-
Save thiagoelg/17c047c176f93eb107d70fc40a7e01f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/../kogito-serverless-operator/hack/bump-version.sh b/packages/kogito-serverless-operator/hack/bump-version.sh | |
index d74fd88aea5..b7da2a06bcc 100755 | |
--- a/../kogito-serverless-operator/hack/bump-version.sh | |
+++ b/packages/kogito-serverless-operator/hack/bump-version.sh | |
@@ -31,7 +31,7 @@ if [ -z "${new_version}" ]; then | |
exit 1 | |
fi | |
-imageSuffix=$(if [[ "${new_version}" == *snapshot ]]; then echo '-nightly'; else echo ''; fi) | |
+imageSuffix=$(if [[ "${new_version}" == 0.0.0 ]]; then echo '-nightly'; else echo ''; fi) | |
oldMajorMinorVersion=${old_version%.*} | |
newMajorMinorVersion=${new_version%.*} | |
@@ -44,8 +44,6 @@ fi | |
echo "Set new version to ${new_version} (img_suffix = '${imageSuffix}', majorMinor = ${newMajorMinorVersion})" | |
-sed -i "s|version: ${old_version}|version: ${new_version}|g" image.yaml | |
- | |
sed -i "s|^VERSION ?=.*|VERSION ?= ${new_version}|g" Makefile | |
sed -i "s|^REDUCED_VERSION ?=.*|REDUCED_VERSION ?= ${newMajorMinorVersion}|g" Makefile | |
sed -i "s|newTag:.*|newTag: ${new_version}|g" config/manager/kustomization.yaml | |
@@ -55,12 +53,20 @@ sed -i "s|newName:.*|newName: ${imageTag}${imageSuffix}|g" config/manager/kustom | |
# Update kogito-swf-* images | |
find . -name "*.yaml" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} + | |
-sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" Dockerfile | |
+find . -name "*.containerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "*.dockerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "Dockerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "*.go" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} + | |
find . -name "*.yaml" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} + | |
-sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" Dockerfile | |
+find . -name "*.containerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "*.dockerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "Dockerfile" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+find . -name "*.go" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} + | |
+ | |
+find . -name "*.yaml" -exec sed -i "s|quay.io/kiegroup/kogito-serverless-operator.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-serverless-operator${imageSuffix}:${newMajorMinorVersion}|" {} + | |
-sed -i -r "s|OperatorVersion =.*|OperatorVersion = \"${new_version}\"|g" version/version.go | |
+sed -i -r "s|OperatorVersion = .*|OperatorVersion = \"${new_version}\"|g" version/version.go | |
sed -i "s|containerImage:.*|containerImage: ${imageTag}${imageSuffix}:${newMajorMinorVersion}|g" $(getCsvFile) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment