This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5aac664d02 chore: Minor updating of the release scripts.
5aac664d02 is described below

commit 5aac664d0292977c342d116ba9bf8e4eee3daac8
Author: Christofer Dutz <[email protected]>
AuthorDate: Wed Apr 9 22:03:59 2025 +0200

    chore: Minor updating of the release scripts.
---
 tools/release-0-update-generated-code.sh | 6 ++----
 tools/release-1-create-branch.sh         | 5 ++---
 tools/release-2-prepare-release.sh       | 3 +--
 tools/release-3-perform-release.sh       | 3 +--
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/tools/release-0-update-generated-code.sh 
b/tools/release-0-update-generated-code.sh
index 556bac75b1..9c7fbebcab 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-update-generated-code.sh
@@ -47,15 +47,13 @@ rm -r "$DIRECTORY/plc4c/generated-sources"
 
 # 3. Run the maven build for all modules with "update-generated-code" enabled 
(Docker container)
 docker compose build
-docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository clean package -DskipTests
-if [ $? -ne 0 ]; then
+if ! docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository clean package -DskipTests; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
 fi
 
 # 4. Make sure the generated driver documentation is up-to-date.
-docker compose run releaser bash /ws/mvnw -e -P with-java 
-Dmaven.repo.local=/ws/out/.repository clean site -pl :plc4j-driver-all
-if [ $? -ne 0 ]; then
+if ! docker compose run releaser bash /ws/mvnw -e -P with-java 
-Dmaven.repo.local=/ws/out/.repository clean site -pl :plc4j-driver-all; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
 fi
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index da0dee30f3..cf5ea7c033 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -41,7 +41,7 @@ echo "Release Branch Name: '$BRANCH_NAME'"
 echo "New develop Version: '$NEW_VERSION'"
 
 # 2. Ask if the RELEASE_NOTES have been filled out at all (local)
-read -p "Have the RELEASE_NOTES been updated for this version? (yes/no) " yn
+read -pr "Have the RELEASE_NOTES been updated for this version? (yes/no) " yn
 case $yn in
        yes ) echo continuing with the process;;
        no ) echo Please update the RELEASE_NOTES first;
@@ -51,8 +51,7 @@ case $yn in
 esac
 
 # 3. Do a simple maven branch command with pushChanges=false
-docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository release:branch 
-DautoVersionSubmodules=true -DpushChanges=false 
-DdevelopmentVersion="$NEW_VERSION" -DbranchName="$BRANCH_NAME"
-if [ $? -ne 0 ]; then
+if ! docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository release:branch 
-DautoVersionSubmodules=true -DpushChanges=false 
-DdevelopmentVersion="$NEW_VERSION" -DbranchName="$BRANCH_NAME"; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
 fi
diff --git a/tools/release-2-prepare-release.sh 
b/tools/release-2-prepare-release.sh
index f8a401e0b0..65364e017f 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -34,8 +34,7 @@ IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
 
NEW_VERSION="${VERSION_SEGMENTS[0]}.${VERSION_SEGMENTS[1]}.$((VERSION_SEGMENTS[2]
 + 1))-SNAPSHOT"
 
 # 1. Do a simple release-prepare command
-docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository release:prepare 
-DautoVersionSubmodules=true -DreleaseVersion="$RELEASE_VERSION" 
-DdevelopmentVersion="$NEW_VERSION" -Dtag="v$RELEASE_VERSION"
-if [ $? -ne 0 ]; then
+if ! docker compose run releaser bash /ws/mvnw -e -P 
with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,update-generated-code
 -Dmaven.repo.local=/ws/out/.repository release:prepare 
-DautoVersionSubmodules=true -DreleaseVersion="$RELEASE_VERSION" 
-DdevelopmentVersion="$NEW_VERSION" -Dtag="v$RELEASE_VERSION"; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
 fi
diff --git a/tools/release-3-perform-release.sh 
b/tools/release-3-perform-release.sh
index dd60b86b33..a1e56553be 100755
--- a/tools/release-3-perform-release.sh
+++ b/tools/release-3-perform-release.sh
@@ -24,8 +24,7 @@
 # 1. Do a simple release-perform command skip signing of artifacts and deploy 
to local directory (inside the Docker container)
 echo "Performing Release:"
 docker compose build
-docker compose run releaser bash /ws/mvnw -e 
-Dmaven.repo.local=/ws/out/.repository 
-DaltDeploymentRepository=snapshot-repo::default::file:/ws/out/.local-artifacts-dir
 release:perform
-if [ $? -ne 0 ]; then
+if ! docker compose run releaser bash /ws/mvnw -e 
-Dmaven.repo.local=/ws/out/.repository 
-DaltDeploymentRepository=snapshot-repo::default::file:/ws/out/.local-artifacts-dir
 release:perform; then
     echo "Got non-0 exit code from docker compose, aborting."
     exit 1
 fi

Reply via email to