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 355986020c chore: Back-ported the latest additions to the
tools-scripts back to develop.
355986020c is described below
commit 355986020c90cbab6c111288da1029fdd7f8e134
Author: Christofer Dutz <[email protected]>
AuthorDate: Fri Aug 1 17:25:57 2025 +0200
chore: Back-ported the latest additions to the tools-scripts back to
develop.
---
RELEASE_NOTES | 1 -
tools/release-1-create-branch.sh | 10 ++-
tools/release-2-prepare-release.sh | 141 +++++++++++++++++++++++++++----------
tools/release-abort.sh | 2 +-
4 files changed, 112 insertions(+), 42 deletions(-)
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index a180ecaf05..73c9a2aa5f 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -12,7 +12,6 @@ Bug Fixes
---------
==============================================================
-
Apache PLC4X 0.13.0
==============================================================
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index 5430afef51..3dfeee8812 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -115,10 +115,10 @@ Incompatible changes\n\
Bug Fixes\n\
---------\n\
\n\
-==============================================================\n\
+==============================================================\
"
echo NEW_VERSION
-if ! sed -i '' "1s/.*/$NEW_HEADER/" $DIRECTORY/RELEASE_NOTES; then
+if ! sed -i '' "1s/.*/$NEW_HEADER/" "$DIRECTORY/RELEASE_NOTES"; then
echo "❌ Got non-0 exit code from adding a new header to RELEASE_NOTES,
aborting."
exit 1
fi
@@ -154,4 +154,10 @@ if ! git -C "$DIRECTORY" checkout "$BRANCH_NAME"; then
exit 1
fi
+# Make sure the release branch is also pushed to the remote.
+if ! git -C "$DIRECTORY" push --set-upstream origin "$BRANCH_NAME"; then
+ echo "❌ Got non-0 exit code from pushing changes, aborting."
+ exit 1
+fi
+
echo "✅ Release branch creation complete. We have switched the local branch to
the release branch. Please continue with 'release-2-prepare-release.sh' as soon
as the release branch is ready for being released."
\ No newline at end of file
diff --git a/tools/release-2-prepare-release.sh
b/tools/release-2-prepare-release.sh
index 06f0158595..c67b61efa7 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -33,15 +33,32 @@ fi
PROJECT_VERSION=$("$DIRECTORY"/mvnw -f "$DIRECTORY"/pom.xml -q
-Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive
exec:exec)
RELEASE_VERSION=${PROJECT_VERSION%"-SNAPSHOT"}
+TAG_NAME="v$RELEASE_VERSION"
IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
NEW_VERSION="${VERSION_SEGMENTS[0]}.${VERSION_SEGMENTS[1]}.$((VERSION_SEGMENTS[2]
+ 1))-SNAPSHOT"
+# Check if a local tag already exists (This can happen if a first release
attempt failed)
+if git -C "$DIRECTORY" rev-parse "$TAG_NAME" >/dev/null 2>&1; then
+ echo "❌ Tag '$TAG_NAME' exists locally. Please delete with 'git tag -d
$TAG_NAME'"
+ exit 1
+else
+ echo "✅ Tag '$TAG_NAME' does not exist locally."
+fi
+
+# Check if a remote tag already exists (This can happen if a first release
attempt failed)
+if git -C "$DIRECTORY" ls-remote --tags origin | grep -q
"refs/tags/$TAG_NAME$"; then
+ echo "❌ Tag '$TAG_NAME' exists on remote 'origin'. Please delete with 'git
push origin --delete $TAG_NAME'"
+ exit 1
+else
+ echo "✅ Tag '$TAG_NAME' does not exist on remote 'origin'."
+fi
+
########################################################################################################################
# 1. Do a simple release-prepare command
########################################################################################################################
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
+ 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='$TAG_NAME'"; then
echo "❌ Got non-0 exit code from docker compose, aborting."
exit 1
fi
@@ -55,12 +72,14 @@ if ! git -C "$DIRECTORY" push; then
exit 1
fi
+TAG_COMMIT_HASH=$(git -C "$DIRECTORY" rev-list -n 1 "$TAG_NAME")
+echo "✅ Tag '$TAG_NAME' has hash '$TAG_COMMIT_HASH'"
+
########################################################################################################################
# 3. Do a simple release-perform command skip signing of artifacts and deploy
to local directory (inside the Docker container)
########################################################################################################################
echo "Performing Release:"
-#docker compose -f "$DIRECTORY/tools/docker-compose.yaml" build
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."
@@ -81,29 +100,28 @@ find $DIRECTORY/out/.local-artifacts-dir -print | grep -E
'^((.*\.pom)|(.*\.jar)
done
########################################################################################################################
-# 5. Deploy the artifacts to Nexus
+# 5. Deploy the artifacts to Nexus and close the staging repo
########################################################################################################################
+# If this doesn't work and results in errors complaining about "404 not
found", the stating profile id
+# might have changed. To update that, go to https://repository.apache.org and
log in. Then select "Staging Profiles"
+# and click on the one named "org.apache.plc4x". The browser URL will be
updated to something like:
+# https://repository.apache.org/#stagingProfiles;15cd9d785359f8 ... the id
after the "#stagingProfiles;" is the
+# staging profile id.
echo "Deploying artifacts:"
-if ! "$(DIRECTORY)/mvnw" -f "$(DIRECTORY)/tools/stage.pom"
nexus-staging:deploy-staged-repository; then
- cho "❌ Got non-0 exit code from staging artifacts, aborting."
- 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."
+STAGING_PROFILE_ID=15cd9d785359f8
+# Clean up any pre-existing properties file, as otherwise we'll also deploy
that,
+# and that will cause errors when closing.
+rm "$DIRECTORY/out/.local-artifacs-dir/$STAGING_PROFILE_ID.properties"
+if ! "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom"
nexus-staging:deploy-staged-repository -DstagingProfileId=$STAGING_PROFILE_ID;
then
+ echo "❌ Got non-0 exit code from staging artifacts, aborting."
exit 1
fi
# Get the url of the closed repo to add that to the VOTE email
-DEPLOY_PROPS="$HOME/.m2/repository/.nexus-staging/deploy.properties"
-STAGING_REPO_ID=$(grep stagingRepositoryId "$DEPLOY_PROPS" | cut -d= -f2)
-NEXUS_URL="https://repository.apache.org/"
+DEPLOY_PROPS="$DIRECTORY/out/.local-artifacts-dir/$STAGING_PROFILE_ID.properties"
+STAGING_REPO_ID=$(grep stagingRepository.id "$DEPLOY_PROPS" | cut -d= -f2)
+NEXUS_URL="https://repository.apache.org"
STAGING_REPO_URL="$NEXUS_URL/content/repositories/$STAGING_REPO_ID"
echo "✅ Staging repository closed: $STAGING_REPO_URL"
@@ -114,31 +132,31 @@ echo "✅ Staging repository closed: $STAGING_REPO_URL"
echo "Staging release candidate:"
read -r -p 'Release-Candidate number: ' rcNumber
RELEASE_CANDIDATE="rc$rcNumber"
-RELEASE_VERSION=$(find
$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/ -maxdepth 1
-type d | grep -vE 'plc4x-parent/$' | xargs -n 1 basename)
-mkdir -p "$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}"
-cp "$DIRECTORY/README.md"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/README"
-cp "$DIRECTORY/RELEASE_NOTES"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.asc"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip.asc"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.sha512"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip.sha512"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.json"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.json"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.json.asc"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.json.asc"
-cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.xml"
"$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.xml"
-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"
+RELEASE_VERSION=$(find
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/" -maxdepth
1 -type d | grep -vE 'plc4x-parent/$' | xargs -n 1 basename)
+mkdir -p "$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE"
+cp "$DIRECTORY/README.md"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/README"
+cp "$DIRECTORY/RELEASE_NOTES"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip.asc"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-source-release.zip.sha512"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.sha512"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.json"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.json"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.json.asc"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.json.asc"
+cp
"$DIRECTORY/out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/$RELEASE_VERSION/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml"
"$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml"
+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"
########################################################################################################################
# 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}"
+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"
########################################################################################################################
# 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"
-SIGNED_FILE="$DIRECTORY/out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip.asc"
+ORIGINAL_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip"
+SIGNATURE_FILE="$DIRECTORY/out/stage/$RELEASE_VERSION/$RELEASE_CANDIDATE/apache-plc4x-$RELEASE_VERSION-source-release.zip.asc"
KEYS_URL="https://dist.apache.org/repos/dist/release/plc4x/KEYS"
TEMP_DIR=$(mktemp -d)
@@ -154,11 +172,11 @@ echo "🔑 Importing KEYS into temporary GPG keyring"
gpg --no-default-keyring --keyring "$KEYRING" --import "$KEYS_FILE" >
/dev/null 2>&1
# Verify the signature
-echo "🧾 Verifying signature on $SIGNED_FILE"
-if gpg --no-default-keyring --keyring "$KEYRING" --verify "$SIGNED_FILE"
"$ORIGINAL_FILE" 2>&1 | grep -q "Good signature"; then
- echo "✅ Signature is valid and signed by a key in the Apache PLC4X KEYS file"
+echo "🧾 Verifying signature on $ORIGINAL_FILE with $SIGNATURE_FILE"
+if gpg --no-default-keyring --keyring "$KEYRING" --verify "$SIGNATURE_FILE"
"$ORIGINAL_FILE" > /dev/null 2>&1; then
+ echo "✅ Signature is valid and signed by a key in the Apache PLC4X KEYS
file"
else
- echo "❌ Signature is invalid or the key is not in the Apache PLC4X KEYS file"
+ echo "❌ Signature is invalid or the key is not in the Apache PLC4X KEYS
file"
exit 1
fi
@@ -166,5 +184,52 @@ fi
rm -rf "$TEMP_DIR"
########################################################################################################################
-# 10. TODO: Send out the [VOTE] and [DISCUSS] emails
+# 10. Prepare the [VOTE] and [DISCUSS] emails
########################################################################################################################
+
+cat > "$DIRECTORY/out/stage/vote-email.eml" <<EOF
+To: [email protected]
+Subject: [VOTE] Apache PLC4X $RELEASE_VERSION $RELEASE_CANDIDATE
+Content-Type: text/plain; charset=UTF-8
+
+Apache PLC4X $RELEASE_VERSION has been staged under [2] and it’s time to vote
+on accepting it for release. All Maven artifacts are available under [1].
+Voting will be open for 72hr.
+
+A minimum of 3 binding +1 votes and more binding +1 than binding -1
+are required to pass.
+
+Release tag: v$RELEASE_VERSION
+Hash for the release tag: $TAG_COMMIT_HASH
+
+Per [3] "Before voting +1 PMC members are required to download
+the signed source code package, compile it as provided, and test
+the resulting executable on their own platform, along with also
+verifying that the package meets the requirements of the ASF policy
+on releases."
+
+You can achieve the above by following [4].
+
+[ ] +1 accept (indicate what you validated - e.g. performed the non-RM items
in [4])
+[ ] -1 reject (explanation required)
+
+
+[1] $STAGING_REPO_URL
+[2]
https://dist.apache.org/repos/dist/dev/plc4x/$RELEASE_VERSION/$RELEASE_CANDIDATE
+[3] https://www.apache.org/dev/release.html#approving-a-release
+[4] https://plc4x.apache.org/plc4x/latest/developers/release/validation.html
+EOF
+echo "✅ Vote email generated to $DIRECTORY/out/stage/vote-email.eml"
+
+cat > "$DIRECTORY/out/stage/discuss-email.eml" <<EOF
+To: [email protected]
+Subject: [DISCUSS] Apache PLC4X $RELEASE_VERSION $RELEASE_CANDIDATE
+Content-Type: text/plain; charset=UTF-8
+
+This is the discussion thread for the corresponding VOTE thread.
+
+Please keep discussions in this thread to simplify the counting of votes.
+
+If you have to vote -1 please mention a brief description on why and then take
the details to this thread.
+EOF
+echo "✅ Discuss email generated to $DIRECTORY/out/stage/discuss-email.eml"
diff --git a/tools/release-abort.sh b/tools/release-abort.sh
index 4d8653994c..790db3c0a8 100755
--- a/tools/release-abort.sh
+++ b/tools/release-abort.sh
@@ -20,7 +20,7 @@
# ----------------------------------------------------------------------------
DIRECTORY=$(pwd)
-PRE_RELEASE_VERSION=0.12.0-SNAPSHOT
+PRE_RELEASE_VERSION=0.13.0-SNAPSHOT
# Set the local development version back to the initial one.
docker compose run releaser bash /ws/mvnw -e -P
with-c,with-dotnet,with-go,with-java,with-python,update-generated-code
-Dmaven.repo.local=/ws/out/.repository versions:set
-DnewVersion="$PRE_RELEASE_VERSION"