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 9cb17dddf5 chore: Continued working on the release scripts.
9cb17dddf5 is described below
commit 9cb17dddf56b2e98b0e8e5871d6d98de04d1a810
Author: Christofer Dutz <[email protected]>
AuthorDate: Thu Jul 31 18:08:26 2025 +0200
chore: Continued working on the release scripts.
---
tools/release-0-update-generated-code.sh | 14 ++++++++++++--
tools/release-1-create-branch.sh | 3 ++-
tools/release-2-prepare-release.sh | 20 +++++++++++---------
3 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/tools/release-0-update-generated-code.sh
b/tools/release-0-update-generated-code.sh
index dbb75ab7b7..532dbd7167 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-update-generated-code.sh
@@ -130,23 +130,33 @@ fi
# 5 Run the maven build for all modules with "update-generated-code" enabled
(Docker container)
########################################################################################################################
+# Build the container we'll use for releasing.
if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" build; then
echo "❌ Got non-0 exit code from building the release docker container,
aborting."
exit 1
+else
+ echo "✅ Docker container successfully built."
fi
-if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" 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
+# Run the main build to re-generate the generated code.
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/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 running the code-generation inside
docker, aborting."
exit 1
+else
+ echo "✅ Main repository generated code successfully re-generated."
fi
########################################################################################################################
# 6. Make sure the generated driver documentation is up-to-date.
########################################################################################################################
-if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser
bash /ws/mvnw -e -P with-java -Dmaven.repo.local=/ws/out/.repository clean site
-pl :plc4j-driver-all; then
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/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 running the site code-generation inside
docker, aborting."
exit 1
+else
+ echo "✅ Website documentation successfully re-generated."
fi
########################################################################################################################
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index 1f8bd90d36..b18b42109d 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -63,7 +63,8 @@ esac
# 4. Do a simple maven branch command with pushChanges=false
########################################################################################################################
-if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" 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
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/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 f67ad11af2..06f0158595 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -40,7 +40,8 @@
NEW_VERSION="${VERSION_SEGMENTS[0]}.${VERSION_SEGMENTS[1]}.$((VERSION_SEGMENTS[2
# 1. Do a simple release-prepare command
########################################################################################################################
-if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" 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
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/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
@@ -60,7 +61,8 @@ fi
echo "Performing Release:"
#docker compose -f "$DIRECTORY/tools/docker-compose.yaml" build
-if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" 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
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/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
@@ -88,6 +90,10 @@ if ! "$(DIRECTORY)/mvnw" -f "$(DIRECTORY)/tools/stage.pom"
nexus-staging:deploy-
exit 1
fi
+########################################################################################################################
+# 6. Close the Nexus staging repository
+########################################################################################################################
+
echo "Closing staging repository:"
if ! "$(DIRECTORY)/mvnw" -f "$(DIRECTORY)/tools/stage.pom"
nexus-staging:rc-close; then
cho "❌ Got non-0 exit code from closing staging repository, aborting."
@@ -102,7 +108,7 @@
STAGING_REPO_URL="$NEXUS_URL/content/repositories/$STAGING_REPO_ID"
echo "✅ Staging repository closed: $STAGING_REPO_URL"
########################################################################################################################
-# 6. Prepare a directory for the release candidate
+# 7. Prepare a directory for the release candidate
########################################################################################################################
echo "Staging release candidate:"
@@ -121,14 +127,14 @@ cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_
cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.xml.asc"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.xml.asc"
########################################################################################################################
-# 7. Upload the release candidate artifacts to SVN
+# 8. Upload the release candidate artifacts to SVN
########################################################################################################################
cd "$DIRECTORY/out/stage/${RELEASE_VERSION}" || exit
svn import "${RELEASE_CANDIDATE}"
"https://dist.apache.org/repos/dist/dev/plc4x/${RELEASE_VERSION}/${RELEASE_CANDIDATE}"
-m"Staging of ${RELEASE_CANDIDATE} of PLC4X ${RELEASE_VERSION}"
########################################################################################################################
-# 8. Make sure the currently used GPG key is available in the KEYS file
+# 9. Make sure the currently used GPG key is available in the KEYS file
########################################################################################################################
ORIGINAL_FILE="$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip"
@@ -159,10 +165,6 @@ fi
# Cleanup
rm -rf "$TEMP_DIR"
-########################################################################################################################
-# 9. TODO: Close the Nexus staging repository
-########################################################################################################################
-
########################################################################################################################
# 10. TODO: Send out the [VOTE] and [DISCUSS] emails
########################################################################################################################