chore: fix: don't fail release if commit/push is a no-op (for 7.yy.z releases) (#433)

* fix: fix set_tag_version_images.sh for bugfix releases

Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>

* fix: fix set_tag_version_images.sh for bugfix releases

Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>

* fixup! fix: fix set_tag_version_images.sh for bugfix releases

---------

Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
pull/435/head
Mykhailo Kuznietsov 2023-02-02 18:54:56 +02:00 committed by GitHub
parent 3b39854685
commit 3dd20f690a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 27 deletions

View File

@ -1,20 +0,0 @@
#!/bin/bash
# Copyright (c) 2017-2021 Red Hat, Inc.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
sed_in_place() {
SHORT_UNAME=$(uname -s)
if [ "$(uname)" == "Darwin" ]; then
sed -i '' "$@"
elif [ "${SHORT_UNAME:0:5}" == "Linux" ]; then
sed -i "$@"
fi
}
# only use /latest plugins so updates are smoother (old plugins are deleted from registries with each new release)
plugin_version="latest"
sed_in_place -r -e "s#che.factory.default_editor=eclipse/che-theia/.*#che.factory.default_editor=eclipse/che-theia/$plugin_version#g" ../assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties
sed_in_place -r -e "s#che.workspace.devfile.default_editor=eclipse/che-theia/.*#che.workspace.devfile.default_editor=eclipse/che-theia/$plugin_version#g" ../assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties

View File

@ -21,6 +21,15 @@ IMAGES_LIST=(
quay.io/eclipse/che-server
)
sed_in_place() {
SHORT_UNAME=$(uname -s)
if [ "$(uname)" == "Darwin" ]; then
sed -i '' "$@"
elif [ "${SHORT_UNAME:0:5}" == "Linux" ]; then
sed -i "$@"
fi
}
loadMvnSettingsGpgKey() {
set +x
mkdir $HOME/.m2
@ -395,13 +404,17 @@ bumpVersion() {
}
updateImageTagsInCheServer() {
cd che-server
git checkout ${BRANCH}
cd .ci
./set_tag_version_images.sh ${CHE_VERSION}
cd ..
git commit -asm "chore: Set ${CHE_VERSION} release image tags"
git push origin ${BRANCH}
pushd che-server >/dev/null
git checkout ${BRANCH}
plugin_version="latest"
sed_in_place -r -e "s#che.factory.default_editor=eclipse/che-theia/.*#che.factory.default_editor=eclipse/che-theia/$plugin_version#g" assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties
sed_in_place -r -e "s#che.workspace.devfile.default_editor=eclipse/che-theia/.*#che.workspace.devfile.default_editor=eclipse/che-theia/$plugin_version#g" assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/che.properties
if [[ $(git diff --stat) != '' ]]; then
git commit -asm "chore: Set ${CHE_VERSION} release image tags"
git push origin ${BRANCH}
fi
popd >/dev/null
}
installMaven