You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2024/02/16 08:36:26 UTC
(plc4x) branch develop updated: chore: Some improvements added during the last release attempt
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 276a6b201f chore: Some improvements added during the last release attempt
276a6b201f is described below
commit 276a6b201ff5bd9fa801c15e3b6c5fb488c66ab6
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Fri Feb 16 09:36:19 2024 +0100
chore: Some improvements added during the last release attempt
---
tools/release-1-create-branch.sh | 4 +++-
tools/release-2-prepare-release.sh | 4 +++-
tools/release-3-perform-release.sh | 12 ++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index e2c5b271e4..740959c130 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -19,6 +19,8 @@
# under the License.
# ----------------------------------------------------------------------------
+DIRECTORY=$(pwd)
+
# 0. Check if there are uncommitted changes as these would automatically be committed (local)
if [[ $(git status --porcelain) ]]; then
# Changes
@@ -49,7 +51,7 @@ case $yn in
esac
# 3. Do a simple maven branch command with pushChanges=false
-../mvnw -f ../pom.xml -e -P with-c,with-dotnet,with-go,with-java,with-python,with-sandbox -Dmaven.repo.local=../out/.repository release:branch -DautoVersionSubmodules=true -DpushChanges=false -DdevelopmentVersion="$NEW_VERSION" -DbranchName="$BRANCH_NAME"
+../mvnw -f ../pom.xml -e -P with-c,with-dotnet,with-go,with-java,with-python,with-sandbox -Dmaven.repo.local=$DIRECTORY/../out/.repository release:branch -DautoVersionSubmodules=true -DpushChanges=false -DdevelopmentVersion="$NEW_VERSION" -DbranchName="$BRANCH_NAME"
if [ $? -ne 0 ]; then
echo "Got non-0 exit code from docker compose, aborting."
exit 1
diff --git a/tools/release-2-prepare-release.sh b/tools/release-2-prepare-release.sh
index a4b63aa331..3fa1d4dbd0 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -19,6 +19,8 @@
# under the License.
# ----------------------------------------------------------------------------
+DIRECTORY=$(pwd)
+
# 0. Check if there are uncommitted changes as these would automatically be committed (local)
if [[ $(git status --porcelain) ]]; then
# Changes
@@ -32,7 +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
-../mvnw -f ../pom.xml -e -P with-c,with-dotnet,with-go,with-java,with-python,with-sandbox -Dmaven.repo.local=../out/.repository release:prepare -DautoVersionSubmodules=true -DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$NEW_VERSION" -Dtag="v$RELEASE_VERSION"
+../mvnw -f ../pom.xml -e -P with-c,with-dotnet,with-go,with-java,with-python,with-sandbox,update-generated-code -Dmaven.repo.local=$DIRECTORY/../out/.repository release:prepare -DautoVersionSubmodules=true -DreleaseVersion="$RELEASE_VERSION" -DdevelopmentVersion="$NEW_VERSION" -Dtag="v$RELEASE_VERSION"
if [ $? -ne 0 ]; then
echo "Got non-0 exit code from docker compose, aborting."
exit 1
diff --git a/tools/release-3-perform-release.sh b/tools/release-3-perform-release.sh
index 3149a50b9a..acc3f26342 100755
--- a/tools/release-3-perform-release.sh
+++ b/tools/release-3-perform-release.sh
@@ -22,18 +22,30 @@
# 0. Check if the release properties file exists.
# 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 run --rm 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
+ echo "Got non-0 exit code from docker compose, aborting."
+ exit 1
+fi
# 2. Sign all artifacts
+echo "Signing artifacts:"
find ./out/.local-artifacts-dir -print | grep -E '^((.*\.pom)|(.*\.jar)|(.*\.kar)|(.*\.nar)|(.*-features\.xml)|(.*-cycloneds\.json)|(.*-cycloneds\.xml)|(.*-site\.xml)|(.*\.zip))$' | while read -r line ; do
echo "Processing $line"
gpg -ab "$line"
done
# 3. Deploy the artifacts to Nexus
+echo "Deploying artifacts:"
../mvnw -f jenkins.pom -X -P deploy-releases wagon:upload
+if [ $? -ne 0 ]; then
+ echo "Got non-0 exit code from maven deployment, aborting."
+ exit 1
+fi
# 4. Prepare a directory for the release candidate
+echo "Staging release candidate:"
RELEASE_VERSION=$(find ../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/ -maxdepth 1 -type d | grep -vE 'plc4x-parent/$' | xargs -n 1 basename)
mkdir -p "../out/stage/${RELEASE_VERSION}/rc1"
cp ../README.md "../out/stage/${RELEASE_VERSION}/rc1/README"