You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by qu...@apache.org on 2026/09/20 14:55:56 UTC
(plc4x-extras) 02/02: chore: update tools scripts for plc4x-extras repo
This is an automated email from the ASF dual-hosted git repository.
QuanticPony pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-extras.git
commit 420dc6fff85bd29ec1ab3df121b33283f6b2d424
Author: Unai LerΓa Fortea <qu...@apache.org>
AuthorDate: Sun Sep 20 16:55:40 2026 +0200
chore: update tools scripts for plc4x-extras repo
---
.gitignore | 86 ++-
RELEASE_NOTES | 6 +-
plc4j/tools/plc4x-server/pom.xml | 2 +
pom.xml | 2 +-
tools/Dockerfile | 16 +-
tools/docker-compose.yaml | 8 +-
...update-generated-code.sh => release-0-build.sh} | 94 +--
tools/release-1-create-branch.sh | 143 +----
tools/release-2-prepare-release.sh | 34 +-
tools/release-3-finish-release.sh | 642 ++++++++++-----------
tools/release-abort.sh | 11 +-
tools/release-common.sh | 6 +-
tools/release-preflight.sh | 10 +-
tools/stage.pom | 2 +-
tools/validate-release.sh | 14 +-
15 files changed, 487 insertions(+), 589 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8fb7c48e..0965dd7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,84 @@
-.idea
-target
+# User-specific stuff:
+.idea/*.xml
+*/.idea/*.xml
+*.iml
+.vscode/**
+.java-version
+.attach_pid*
+
+
+
+# Sensitive or high-churn files:
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.xml
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+# Asciidoctor plugin
+.asciidoctor
+
+### Maven template
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+
+### Eclipse template
+.metadata
+*.tmp
+*.bak
+*.swp
+#*~.nib
+local.properties
+.settings/
+.loadpath
+.recommenders
+.project
+.classpath
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# STS (Spring Tool Suite)
+.springBeans
+
+# Scala IDE specific (Scala & Java development for Eclipse)
+.cache-main
+.scala_dependencies
+.worksheet
+
+# Emacs backup files
+#*~
+.scannerwork
+
+spock-reports
+
# Develocity
.mvn/.gradle-enterprise/
@@ -8,3 +87,6 @@ target
# Source bundle from PLC4C
/plc4c/plc4c/
+
+# Release build output
+/out/
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index c1324127..340df861 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,5 +1,5 @@
==============================================================
-(Unreleased) Apache PLC4X 1.0.0-SNAPSHOT
+(Unreleased) Apache PLC4X Extras 1.0.0-SNAPSHOT
==============================================================
New Features
@@ -60,7 +60,7 @@ Bug Fixes
loading the shaded artifact.
==============================================================
-Apache PLC4X 0.13.1
+Apache PLC4X 0.13.1 Extras
==============================================================
New Features
@@ -74,7 +74,7 @@ Bug Fixes
---------
==============================================================
-Apache PLC4X 0.13.0
+Apache PLC4X 0.13.0 Extras
==============================================================
New Features
diff --git a/plc4j/tools/plc4x-server/pom.xml b/plc4j/tools/plc4x-server/pom.xml
index 67850cdf..b5f9f862 100644
--- a/plc4j/tools/plc4x-server/pom.xml
+++ b/plc4j/tools/plc4x-server/pom.xml
@@ -32,6 +32,8 @@
<properties>
<project.build.outputTimestamp>2025-08-06T15:45:09Z</project.build.outputTimestamp>
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ <source.skip>true</source.skip>
</properties>
<build>
diff --git a/pom.xml b/pom.xml
index f1ca6d74..69957bf5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,7 +87,7 @@
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
<project.build.outputTimestamp>2025-08-06T15:45:09Z</project.build.outputTimestamp>
- <plc4x.version>1.0.0-SNAPSHOT</plc4x.version>
+ <plc4x.version>1.0.0</plc4x.version>
</properties>
<!--
diff --git a/tools/Dockerfile b/tools/Dockerfile
index c27a224c..191e917f 100644
--- a/tools/Dockerfile
+++ b/tools/Dockerfile
@@ -31,22 +31,10 @@ RUN apt install -y make libpcap-dev libc-dev git
# Required for "with-c" profile
RUN apt install -y build-essential
-# # Required for "with-dotnet" profile
-# RUN apt install -y wget
-# RUN wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
-# RUN dpkg -i packages-microsoft-prod.deb
-# RUN apt install -y software-properties-common
-# RUN add-apt-repository universe -y
-# RUN apt install -y apt-transport-https
-# RUN apt update -y
-# RUN apt install -y dotnet-sdk-7.0
-
-# # Required for "with-python" profile
-# RUN apt install -y python3 python3-venv python3-pip
-# RUN pip3 install wheel
-
# Required for running on Windows systems
RUN apt install -y dos2unix
+RUN git config --global --add safe.directory /ws
+
# Change the working directory (where commands are executed) into the new "ws" directory
WORKDIR /ws
\ No newline at end of file
diff --git a/tools/docker-compose.yaml b/tools/docker-compose.yaml
index 0ccba6d8..a5b7273b 100644
--- a/tools/docker-compose.yaml
+++ b/tools/docker-compose.yaml
@@ -20,12 +20,12 @@
services:
releaser:
build:
- context: .
- dockerfile: tools/Dockerfile
+ context: ..
+ dockerfile: ./tools/Dockerfile
# Builds all modules and uses an alternate maven local repo and deploys artifacts to a local directory.
- command: ["/ws/mvnw", "-e", "-Dskip-pgp-signing=true", "-P", "with-c,with-dotnet,with-go,with-java,with-python,enable-all-checks,apache-release", "-Dmaven.repo.local=/ws/out/.repository", "-DaltDeploymentRepository=snapshot-repo::file:/ws/out/.local-snapshots-dir", "clean", "deploy"]
+ command: ["/ws/mvnw", "-e", "-Dskip-pgp-signing=true", "-P", "with-c,with-go,with-java,apache-release", "-Dmaven.repo.local=/ws/out/.repository", "-DaltDeploymentRepository=snapshot-repo::file:/ws/out/.local-snapshots-dir", "clean", "deploy"]
volumes:
# Bind the local directory as "/ws"
- type: bind
- source: .
+ source: ..
target: /ws
diff --git a/tools/release-0-update-generated-code.sh b/tools/release-0-build.sh
similarity index 50%
rename from tools/release-0-update-generated-code.sh
rename to tools/release-0-build.sh
index f43032ef..2f9235ff 100755
--- a/tools/release-0-update-generated-code.sh
+++ b/tools/release-0-build.sh
@@ -19,14 +19,14 @@
# under the License.
# ----------------------------------------------------------------------------
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
########################################################################################################################
# 0. Check Docker Memory Availability
########################################################################################################################
-# Minimum required memory in bytes (12 GB)
-REQUIRED_MEM=$((12 * 1024 * 1024 * 1024))
+# Minimum required memory in bytes (4 GB)
+REQUIRED_MEM=$((4 * 1024 * 1024 * 1024))
# Extract total memory from `docker system info`
TOTAL_MEM=$(docker system info --format '{{.MemTotal}}')
@@ -40,7 +40,7 @@ fi
# Compare and exit if not enough memory
if (( TOTAL_MEM < REQUIRED_MEM )); then
echo "β Docker runtime has insufficient memory: $(awk "BEGIN {printf \"%.2f\", $TOTAL_MEM/1024/1024/1024}") GB"
- echo " At least 12 GB is required. Aborting."
+ echo " At least 4 GB is required. Aborting."
exit 1
fi
@@ -62,51 +62,7 @@ echo "Deleting the maven local repo and previous deployments"
rm -r "$DIRECTORY/out"
########################################################################################################################
-# 3. Delete all generated sources (local)
-########################################################################################################################
-
-echo "Deleting generated-sources:"
-# Delete the PLC4J code (local)
-echo " - Deleting: Generated code in PLC4J"
-for dir in "$DIRECTORY/plc4j/drivers"/*; do
- SRC_DIR="$dir/src/main/generated"
- if [[ -d "$SRC_DIR" ]]; then
- echo "π§Ή Deleting files in: $SRC_DIR"
- find "$SRC_DIR" -type f -exec rm {} \;
- fi
-done
-# Delete the PLC4C code (local)
-echo " - Deleting: Generated code in PLC4C"
-echo "π§Ή Deleting files in: $DIRECTORY/plc4c/generated-sources"
-rm -r "$DIRECTORY/plc4c/generated-sources"
-# Delete the PLC4Go code (local)
-echo " - Deleting: Generated code in PLC4Go"
-echo "π§Ή Deleting files in: $DIRECTORY/plc4go/protocols"
-find "$DIRECTORY/plc4go/protocols" -mindepth 2 -type f ! \( -name 'StaticHelper.go' -o -name 'StaticHelper_test.go' \) -exec rm {} \;
-# Delete the PLC4Net code (local)
-echo " - Deleting: Generated code in PLC4Net"
-for dir in "$DIRECTORY/plc4net/drivers"/*; do
- # Delete generated classes
- if [[ -d "$dir" && ! "$(basename "$dir")" =~ -test$ ]]; then
- SRC_DIR="$dir/src"
- if [[ -d "$SRC_DIR" ]]; then
- echo "π§Ή Deleting files in: $SRC_DIR"
- find "$SRC_DIR" -type f -exec rm {} \;
- fi
- else
- SRC_DIR="$dir/resources"
- if [[ -d "$SRC_DIR" ]]; then
- echo "π§Ή Deleting files in: $SRC_DIR"
- find "$SRC_DIR" -type f -exec rm {} \;
- fi
- fi
-done
-# Delete the PLC4Py code (local)
-echo " - Deleting: generated files in $DIRECTORY/plc4py/plc4py/protocols"
-find "$DIRECTORY/plc4py/plc4py/protocols" -mindepth 2 -type f ! \( -name '__init__.py' -o -name 'StaticHelper.py' \) -exec rm {} \;
-
-########################################################################################################################
-# 4. Make sure the NOTICE file has the current year in the second line
+# 3. Make sure the NOTICE file has the current year in the second line
########################################################################################################################
NOTICE_FILE="$DIRECTORY/NOTICE"
@@ -127,49 +83,25 @@ else
fi
########################################################################################################################
-# 5 Run the maven build for all modules with "update-generated-code" enabled (Docker container)
+# 4 Run the maven build for all modules with enabled all "with-*" profiles enable (Docker container)
########################################################################################################################
# Build the container we'll use for releasing.
-if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" build; then
+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
-# 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 install -DskipTests"; then
- echo "β Got non-0 exit code from running the code-generation inside docker, aborting."
+# Run the main build.
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "/ws/mvnw -e -P with-c,with-go,with-java -Dmaven.repo.local=/ws/out/.repository clean install -DskipTests"; then
+ echo "β Got non-0 exit code from running the build inside docker, aborting."
exit 1
else
- echo "β
Main repository generated code successfully re-generated."
+ echo "β
Main repository compiled successfully."
fi
-########################################################################################################################
-# 6. Make sure the generated driver documentation is up-to-date.
-########################################################################################################################
-
-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
-
-########################################################################################################################
-# 7. Commit and push any changed files
-########################################################################################################################
-
-if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
- echo "Committing changes."
- git -C "$DIRECTORY" add --all
- git -C "$DIRECTORY" commit -m "chore: updated generated code"
- git -C "$DIRECTORY" push
-else
- echo "No changes."
-fi
-echo "β
Pre-release updates complete. Please continue with 'release-1-create-branch.sh' next."
\ No newline at end of file
+echo "β
Pre-release updates complete. Please continue with 'release-1-create-branch.sh' next."
diff --git a/tools/release-1-create-branch.sh b/tools/release-1-create-branch.sh
index ea7024e6..59b03886 100755
--- a/tools/release-1-create-branch.sh
+++ b/tools/release-1-create-branch.sh
@@ -19,7 +19,7 @@
# under the License.
# ----------------------------------------------------------------------------
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# BSD and GNU sed disagree about "-i": BSD wants a backup suffix as a separate argument, GNU
@@ -63,13 +63,10 @@ RELEASE_SHORT_VERSION=${RELEASE_VERSION%".0"}
BRANCH_NAME="rel/$RELEASE_SHORT_VERSION"
IFS='.' read -ra VERSION_SEGMENTS <<< "$RELEASE_VERSION"
NEW_VERSION="${VERSION_SEGMENTS[0]}.$((VERSION_SEGMENTS[1] + 1)).0-SNAPSHOT"
-NEW_DOCS_VERSION=${NEW_VERSION%"-SNAPSHOT"}
-ANTORA_DESCRIPTOR="$DIRECTORY/website/asciidoc/antora.yml"
echo "Current Version: '$PROJECT_VERSION'"
echo "Release Version: '$RELEASE_VERSION'"
echo "Release Branch Name: '$BRANCH_NAME'"
echo "New develop Version: '$NEW_VERSION'"
-echo "New develop Docs Version: '$NEW_DOCS_VERSION'"
########################################################################################################################
# 3. Ask if the RELEASE_NOTES have been filled out at all (local)
@@ -88,7 +85,7 @@ esac
# 4 Remove the "(Unreleased)" prefix from the current version of the RELEASE_NOTES file (local)
########################################################################################################################
-if ! sed_in_place "$DIRECTORY/RELEASE_NOTES" "s/(Unreleased) Apache PLC4X $PROJECT_VERSION*/Apache PLC4X $RELEASE_VERSION/"; then
+if ! sed_in_place "$DIRECTORY/RELEASE_NOTES" "s/(Unreleased) Apache PLC4X Extras $PROJECT_VERSION*/Apache PLC4X Extras $RELEASE_VERSION/"; then
echo "β Got non-0 exit code from updating RELEASE_NOTES, aborting."
exit 1
fi
@@ -124,23 +121,23 @@ fi
# "gpg failed to sign the data", as the container has neither the key nor a gpg-agent. Passing
# the identity and the signing switches as GIT_CONFIG_* environment variables overrides the
# config files for the container only, so nothing is written back into the user's repository.
-# if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" run releaser \
-# bash -c "export GIT_CONFIG_COUNT=4 \
-# GIT_CONFIG_KEY_0=user.name GIT_CONFIG_VALUE_0=\"$GIT_USER_NAME\" \
-# GIT_CONFIG_KEY_1=user.email GIT_CONFIG_VALUE_1=\"$GIT_USER_EMAIL\" \
-# GIT_CONFIG_KEY_2=commit.gpgsign GIT_CONFIG_VALUE_2=false \
-# GIT_CONFIG_KEY_3=tag.gpgsign GIT_CONFIG_VALUE_3=false && \
-# /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
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash -c "export GIT_CONFIG_COUNT=4 \
+ GIT_CONFIG_KEY_0=user.name GIT_CONFIG_VALUE_0=\"$GIT_USER_NAME\" \
+ GIT_CONFIG_KEY_1=user.email GIT_CONFIG_VALUE_1=\"$GIT_USER_EMAIL\" \
+ GIT_CONFIG_KEY_2=commit.gpgsign GIT_CONFIG_VALUE_2=false \
+ GIT_CONFIG_KEY_3=tag.gpgsign GIT_CONFIG_VALUE_3=false && \
+ /ws/mvnw -e -P with-c,with-go,with-java -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
########################################################################################################################
# 6. Add a new section for the new version to the RELEASE_NOTES file (local)
########################################################################################################################
NEW_HEADER="==============================================================\n\
-(Unreleased) Apache PLC4X $NEW_VERSION\n\
+(Unreleased) Apache PLC4X Extras $NEW_VERSION\n\
==============================================================\n\
\n\
New Features\n\
@@ -161,73 +158,7 @@ if ! sed_in_place "$DIRECTORY/RELEASE_NOTES" "1s/.*/$NEW_HEADER/"; then
fi
########################################################################################################################
-# 7. Point the documentation of "develop" at the next version (local)
-########################################################################################################################
-
-# Every branch names the concrete version it documents in its own Antora descriptor. The
-# "urls.latest_version_segment" / "urls.latest_prerelease_version_segment" keys in
-# website/antora-playbook.yml then map the newest of them onto the "latest" and
-# "pre-release" URL segments, so no branch ever has to know whether it is the current
-# release. That only works if every branch keeps its version unique and up to date.
-#
-# The descriptor also carries two asciidoc attributes that name the Maven version of the branch:
-# "current-project-version" ("${project.version}" verbatim, so with "-SNAPSHOT") for the dependency
-# snippets in the docs, and "current-full-version" (the same without "-SNAPSHOT") for the release
-# documentation. The "sync-antora-version" execution in "website/pom.xml" keeps them up to date on
-# every build, but that does not help here: the build in step 5 runs before the version is bumped,
-# and nothing would commit the result afterwards. So set them here as well.
-#
-# Sets "version:" (and optionally "prerelease:") in an antora.yml. Arguments:
-# $1 the antora.yml to edit, $2 the version to set, $3 the prerelease value (optional),
-# $4 the Maven version of the branch, e.g. "1.1.0-SNAPSHOT" (optional)
-update_antora_version() {
- local descriptor="$1" version="$2" prerelease="$3" project_version="$4"
-
- if [[ ! -f "$descriptor" ]]; then
- echo "β Antora descriptor '$descriptor' not found, aborting."
- exit 1
- fi
- if ! grep -qE "^version:" "$descriptor"; then
- echo "β No 'version:' key found in '$descriptor', aborting."
- exit 1
- fi
- if ! sed_in_place "$descriptor" -E "s|^version:.*|version: '$version'|"; then
- echo "β Got non-0 exit code from updating the version in '$descriptor', aborting."
- exit 1
- fi
- if [[ -n "$prerelease" ]]; then
- if ! grep -qE "^prerelease:" "$descriptor"; then
- echo "β No 'prerelease:' key found in '$descriptor', aborting."
- exit 1
- fi
- if ! sed_in_place "$descriptor" -E "s|^prerelease:.*|prerelease: $prerelease|"; then
- echo "β Got non-0 exit code from updating the prerelease flag in '$descriptor', aborting."
- exit 1
- fi
- fi
- if [[ -n "$project_version" ]]; then
- local full_version="${project_version%"-SNAPSHOT"}"
- for attribute in "current-project-version:$project_version" "current-full-version:$full_version"; do
- local key="${attribute%%:*}" value="${attribute#*:}"
- if ! grep -qE "^ *$key:" "$descriptor"; then
- echo "β No '$key:' attribute found in '$descriptor', aborting."
- exit 1
- fi
- if ! sed_in_place "$descriptor" -E "s|^( *)$key:.*|\\1$key: '$value'|"; then
- echo "β Got non-0 exit code from updating '$key' in '$descriptor', aborting."
- exit 1
- fi
- done
- echo "β
'$descriptor' now names the Maven version '$project_version'."
- fi
- echo "β
'$descriptor' now documents version '$version'."
-}
-
-# "develop" stays a prerelease, it just moves on to the next version.
-# update_antora_version "$ANTORA_DESCRIPTOR" "$NEW_DOCS_VERSION" "True" "$NEW_VERSION"
-
-########################################################################################################################
-# 8. Commit the change (local)
+# 7. Commit the change (local)
########################################################################################################################
if ! git -C "$DIRECTORY" add --all; then
@@ -240,7 +171,7 @@ if ! git -C "$DIRECTORY" commit -m "chore: prepared the RELEASE_NOTES and the do
fi
########################################################################################################################
-# 9. Push the changes (local)
+# 8. Push the changes (local)
########################################################################################################################
if ! git -C "$DIRECTORY" push; then
@@ -249,7 +180,7 @@ if ! git -C "$DIRECTORY" push; then
fi
########################################################################################################################
-# 10. Switch to the release branch (local)
+# 9. Switch to the release branch (local)
########################################################################################################################
if ! git -C "$DIRECTORY" checkout "$BRANCH_NAME"; then
@@ -259,43 +190,9 @@ 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
-
-########################################################################################################################
-# 11. Point the documentation of the release branch at the version it is going to release (local)
-########################################################################################################################
-
-# The release branch documents the version it is going to release, but stays flagged as a
-# prerelease: nothing has been voted on yet. Nothing of it is published while the vote runs -
-# Antora only reads the branches listed in website/antora-playbook.yml, and
-# 'release-3-finish-release.sh' adds it there after a successful vote. The flag matters at that
-# moment: Antora skips prereleases when it picks the latest version of a component, so the branch
-# would appear under its own version number rather than as ".../plc4x/latest/...".
-# 'release-3-finish-release.sh' clears the flag in the same run, and that is what makes this
-# branch the published release.
-# update_antora_version "$ANTORA_DESCRIPTOR" "$RELEASE_VERSION" "True" "$PROJECT_VERSION"
-
-# Usually there is nothing to commit here: the branch was cut from "develop" before step 6b moved
-# it on, so it already documents the version being released. Only a "develop" that was out of sync
-# leaves an actual change behind.
-if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
- if ! git -C "$DIRECTORY" add "$ANTORA_DESCRIPTOR"; then
- echo "β Got non-0 exit code from adding the Antora descriptor, aborting."
- exit 1
- fi
- if ! git -C "$DIRECTORY" commit -m "chore: set the documentation version of the release branch to $RELEASE_VERSION (still a prerelease)."; then
- echo "β Got non-0 exit code from committing the Antora descriptor, aborting."
- exit 1
- fi
- if ! git -C "$DIRECTORY" push; then
- echo "β Got non-0 exit code from pushing the Antora descriptor, aborting."
- exit 1
- fi
-else
- echo "β
The release branch already documents $RELEASE_VERSION."
+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
+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."
diff --git a/tools/release-2-prepare-release.sh b/tools/release-2-prepare-release.sh
index 92f68e3b..b483815a 100755
--- a/tools/release-2-prepare-release.sh
+++ b/tools/release-2-prepare-release.sh
@@ -19,14 +19,14 @@
# under the License.
# ----------------------------------------------------------------------------
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
-if [[ ! -f "$DIRECTORY/../tools/release-common.sh" ]]; then
- echo "β '$DIRECTORY/../tools/release-common.sh' not found, aborting."
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "β '$DIRECTORY/tools/release-common.sh' not found, aborting."
exit 1
fi
# shellcheck source=release-common.sh
-source "$DIRECTORY/../tools/release-common.sh"
+source "$DIRECTORY/tools/release-common.sh"
########################################################################################################################
@@ -68,8 +68,6 @@ else
echo "β
Tag '$TAG_NAME' does not exist on remote 'origin'."
fi
-# The Antora documentation version of this branch was already set by 'release-1-create-branch.sh'.
-
########################################################################################################################
# 1. Do a simple release-prepare command
########################################################################################################################
@@ -96,13 +94,13 @@ fi
# "gpg failed to sign the data", as the container has neither the key nor a gpg-agent. Passing
# the identity and the signing switches as GIT_CONFIG_* environment variables overrides the
# config files for the container only, so nothing is written back into the user's repository.
-if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" run releaser \
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
bash -c "export GIT_CONFIG_COUNT=4 \
GIT_CONFIG_KEY_0=user.name GIT_CONFIG_VALUE_0=\"$GIT_USER_NAME\" \
GIT_CONFIG_KEY_1=user.email GIT_CONFIG_VALUE_1=\"$GIT_USER_EMAIL\" \
GIT_CONFIG_KEY_2=commit.gpgsign GIT_CONFIG_VALUE_2=false \
GIT_CONFIG_KEY_3=tag.gpgsign GIT_CONFIG_VALUE_3=false && \
- /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
+ /ws/mvnw -e -P with-c,with-go,with-java -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
@@ -124,7 +122,7 @@ echo "β
Tag '$TAG_NAME' has hash '$TAG_COMMIT_HASH'"
########################################################################################################################
echo "Performing Release:"
-if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" run releaser \
+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::file:/ws/out/.local-artifacts-dir release:perform"; then
echo "β Got non-0 exit code from docker compose, aborting."
exit 1
@@ -162,7 +160,7 @@ echo "Deploying artifacts:"
# 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-artifacts-dir/$STAGING_PROFILE_ID.properties"
-if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/../tools/stage.pom" nexus-staging:deploy-staged-repository -DstagingProfileId=$STAGING_PROFILE_ID; then
+if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$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
@@ -174,7 +172,7 @@ STAGING_REPO_URL="$NEXUS_URL/content/repositories/$STAGING_REPO_ID"
echo "β
Staging repository closed: $STAGING_REPO_URL"
########################################################################################################################
-# 7. Prepare a directory for the release candidate
+# 6. Prepare a directory for the release candidate
########################################################################################################################
echo "Staging release candidate:"
@@ -206,7 +204,7 @@ cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml" "$STAGE_DIR/apac
cp "$ARTIFACTS_DIR/plc4x-parent-$RELEASE_VERSION-cyclonedx.xml.asc" "$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-cyclonedx.xml.asc"
########################################################################################################################
-# 8. Make sure the currently used GPG key is available in the KEYS file
+# 7. Make sure the currently used GPG key is available in the KEYS file
########################################################################################################################
ORIGINAL_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip"
@@ -257,7 +255,7 @@ else
fi
########################################################################################################################
-# 8b. Make sure that key belongs to an Apache identity
+# 7b. Make sure that key belongs to an Apache identity
########################################################################################################################
# Being in the KEYS file is not quite enough: the key used to sign an Apache release has to carry
@@ -295,7 +293,7 @@ fi
rm -rf "$TEMP_DIR"
########################################################################################################################
-# 9. Validate the sha512 hashes
+# 8. Validate the sha512 hashes
########################################################################################################################
ORIGINAL_FILE="$STAGE_DIR/apache-plc4x-$RELEASE_VERSION-source-release.zip"
@@ -314,14 +312,14 @@ else
fi
########################################################################################################################
-# 10. Upload the release candidate artifacts to SVN
+# 9. Upload the release candidate artifacts to SVN
########################################################################################################################
cd "$DIRECTORY/out/stage/$RELEASE_VERSION" || exit
svn import "$RELEASE_CANDIDATE" "$DIST_DEV/$RELEASE_VERSION/$RELEASE_CANDIDATE" -m"Staging of $RELEASE_CANDIDATE of PLC4X $RELEASE_VERSION"
########################################################################################################################
-# 11. Prepare the [VOTE] and [DISCUSS] emails
+# 10. Prepare the [VOTE] and [DISCUSS] emails
########################################################################################################################
cat > "$DIRECTORY/out/stage/vote-email.eml" <<EOF
@@ -329,7 +327,7 @@ To: dev@plc4x.apache.org
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
+Apache PLC4X Extras $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.
@@ -360,7 +358,7 @@ echo "β
Vote email generated to $DIRECTORY/out/stage/vote-email.eml"
cat > "$DIRECTORY/out/stage/discuss-email.eml" <<EOF
To: dev@plc4x.apache.org
-Subject: [DISCUSS] Apache PLC4X $RELEASE_VERSION $RELEASE_CANDIDATE
+Subject: [DISCUSS] Apache PLC4X Extras $RELEASE_VERSION $RELEASE_CANDIDATE
Content-Type: text/plain; charset=UTF-8
This is the discussion thread for the corresponding VOTE thread.
diff --git a/tools/release-3-finish-release.sh b/tools/release-3-finish-release.sh
index 52b2c6be..2f0c96d4 100755
--- a/tools/release-3-finish-release.sh
+++ b/tools/release-3-finish-release.sh
@@ -19,14 +19,14 @@
# under the License.
# ----------------------------------------------------------------------------
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
-if [[ ! -f "$DIRECTORY/../tools/release-common.sh" ]]; then
- echo "β '$DIRECTORY/../tools/release-common.sh' not found, aborting."
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "β '$DIRECTORY/tools/release-common.sh' not found, aborting."
exit 1
fi
# shellcheck source=release-common.sh
-source "$DIRECTORY/../tools/release-common.sh"
+source "$DIRECTORY/tools/release-common.sh"
########################################################################################################################
@@ -86,7 +86,7 @@ release_notes_to_asciidoc() {
pending = 0
title = $0
sub(/^\(Unreleased\) /, "", title)
- if (title == "Apache PLC4X " ver) { state = 1 }
+ if (title == "Apache PLC4X Extras " ver) { state = 1 }
next
}
if (state == 2) { print }
@@ -175,14 +175,14 @@ update_download_page() {
head -n "$current_line" "$page"
echo
echo "[#$anchor]"
- echo "=== $version Official https://www.apache.org/dyn/closer.lua/plc4x/$version/apache-plc4x-$version-source-release.zip[source release] [ https://downloads.apache.org/plc4x/$version/apache-plc4x-$version-source-release.zip.sha512[SHA512] ] [ https://downloads.apache.org/plc4x/$version/apache-plc4x-$version-source-release.zip.asc[ASC] ]"
+ echo "=== $version Official https://www.apache.org/dyn/closer.lua/plc4x/plc4x-extras/$version/apache-plc4x-extras-$version-source-release.zip[source release] [ https://downloads.apache.org/plc4x-extras/$version/apache-plc4x-extras-$version-source-release.zip.sha512[SHA512] ] [ https://downloads.apache.org/plc4x/plc4x-extras/$version/apache-plc4x-extras-$version-source-release.zip.asc[ASC] ]"
echo
echo "$notes_body"
echo
echo "== Previous Releases"
# What used to be current, with its source-release link moved to the archive.
sed -n "$((current_line + 1)),$((previous_line - 1))p" "$page" \
- | sed 's|https://www\.apache\.org/dyn/closer\.lua/plc4x/|https://archive.apache.org/dist/plc4x/|g'
+ | sed 's|https://www\.apache\.org/dyn/closer\.lua/plc4x/plc4x-extras/|https://archive.apache.org/dist/plc4x/plc4x-extras/|g'
tail -n +"$((previous_line + 1))" "$page"
} > "$page.tmp"
@@ -195,312 +195,312 @@ update_download_page() {
echo "β
$version added to '$page'."
}
-########################################################################################################################
-# 1. Publish the documentation of this branch as the current release (local)
-########################################################################################################################
-
-# Up to this point the release branch documented the version it was going to release, but was
-# still flagged as a prerelease, so ".../plc4x/latest/..." kept serving the previous release
-# while the vote was running (see 'release-1-create-branch.sh'). The vote has passed, so the
-# flag can be cleared. Antora then picks this branch as the latest version of the component
-# and publishes it as ".../plc4x/latest/...", which at the same time demotes the previous
-# release branch to its own version number. Nothing has to be changed on that older branch.
-#
-# The version is taken from the tag 'release-2-prepare-release.sh' created, so that this also
-# does the right thing for a bugfix release, where 'release-1-create-branch.sh' never ran.
-
-ANTORA_DESCRIPTOR="$DIRECTORY/website/asciidoc/antora.yml"
-
-RELEASE_TAG=$(git -C "$DIRECTORY" describe --tags --abbrev=0 --match "v*" 2>/dev/null)
-if [[ -z "$RELEASE_TAG" ]]; then
- echo "β Could not determine the release tag of this branch, aborting."
- echo " Are you on the release branch, and did 'release-2-prepare-release.sh' run?"
- exit 1
-fi
-RELEASED_VERSION=${RELEASE_TAG#v}
-
-# "git describe" finds the nearest tag reachable from HEAD, which on a maintenance branch that has
-# not been prepared yet is the PREVIOUS release. Check the tag actually belongs to this branch.
-TAG_LINE=$(echo "$RELEASED_VERSION" | cut -d. -f1,2)
-if [[ "$RELEASE_BRANCH" != "rel/$TAG_LINE" ]]; then
- echo "β The most recent tag is '$RELEASE_TAG', which does not belong to branch '$RELEASE_BRANCH', aborting."
- echo " Expected a tag on the rel/$TAG_LINE line. Has 'release-2-prepare-release.sh' run on this branch?"
- exit 1
-fi
-
-read -r -p "Did the vote for $RELEASED_VERSION pass and is it being released? (yes/no) " yn
-case $yn in
- yes ) echo "Publishing the documentation of $RELEASED_VERSION as the current release.";;
- no ) echo "Not publishing anything. Re-run this script once the vote has passed.";
- exit 1;;
- * ) echo "invalid response";
- exit 1;;
-esac
-
-if [[ ! -f "$ANTORA_DESCRIPTOR" ]]; then
- echo "β Antora descriptor '$ANTORA_DESCRIPTOR' not found, aborting."
- exit 1
-fi
-# Check the RELEASE_NOTES before writing anything: the download page needs them further down, and
-# aborting halfway would leave the descriptor modified and the next run blocked by the check for a
-# clean working tree at the top of this script.
-if [[ -z "$(release_notes_to_asciidoc "$DIRECTORY/RELEASE_NOTES" "$RELEASED_VERSION")" ]]; then
- echo "β Found no RELEASE_NOTES section for $RELEASED_VERSION, aborting."
- echo " Expected a block headed 'Apache PLC4X $RELEASED_VERSION' - if it still says"
- echo " '(Unreleased) ... -SNAPSHOT', 'release-1-create-branch.sh' never finalized it."
- exit 1
-fi
-if ! grep -qE "^version:" "$ANTORA_DESCRIPTOR" || ! grep -qE "^prerelease:" "$ANTORA_DESCRIPTOR"; then
- echo "β '$ANTORA_DESCRIPTOR' has no 'version:' and/or 'prerelease:' key, aborting."
- exit 1
-fi
-if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^version:.*|version: '$RELEASED_VERSION'|"; then
- echo "β Got non-0 exit code from updating the version in the Antora descriptor, aborting."
- exit 1
-fi
-if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^prerelease:.*|prerelease: False|"; then
- echo "β Got non-0 exit code from clearing the prerelease flag, aborting."
- exit 1
-fi
-echo "β
'$ANTORA_DESCRIPTOR' now publishes $RELEASED_VERSION as the current release."
-
-# The dependency snippets throughout the docs of this branch ("<version>...</version>", the Gradle
-# equivalents, the capture-replay jar name, ...) all render from a single Antora attribute. On
-# "develop" that attribute is kept in sync with "${project.version}" by the "sync-antora-version"
-# execution in website/pom.xml, which is correct there. It is NOT correct here:
-# "release-2-prepare-release.sh" has already moved the poms on to the next bugfix SNAPSHOT, so
-# "${project.version}" on this branch is something nobody can depend on (0.13.2-SNAPSHOT while
-# 0.13.1 is what was released). Take the value from the release tag instead, so that
-# ".../plc4x/latest/..." tells people to depend on the version that actually exists.
-#
-# Branches cut before the attribute was renamed still carry the old name, and this script has to
-# keep working for a bugfix release on one of those, so accept either spelling.
-ANTORA_VERSION_ATTRIBUTE=""
-for candidate in current-project-version current-last-released-version; do
- if grep -qE "^[[:space:]]*$candidate:" "$ANTORA_DESCRIPTOR"; then
- ANTORA_VERSION_ATTRIBUTE="$candidate"
- break
- fi
-done
-if [[ -z "$ANTORA_VERSION_ATTRIBUTE" ]]; then
- echo "β '$ANTORA_DESCRIPTOR' has neither a 'current-project-version' nor a legacy"
- echo " 'current-last-released-version' attribute, aborting."
- echo " Without it the documentation would advertise a version nobody can depend on."
- exit 1
-fi
-if ! sed_in_place "$ANTORA_DESCRIPTOR" -E \
- "s|^([[:space:]]*)$ANTORA_VERSION_ATTRIBUTE:.*|\\1$ANTORA_VERSION_ATTRIBUTE: '$RELEASED_VERSION'|"; then
- echo "β Got non-0 exit code from updating '$ANTORA_VERSION_ATTRIBUTE', aborting."
- exit 1
-fi
-echo "β
'$ANTORA_DESCRIPTOR' now advertises $RELEASED_VERSION in its dependency snippets."
-
-# "current-full-version" is the same value without the "-SNAPSHOT" suffix, and it is what the
-# release and validation runbooks of this branch render their example URLs and commands from. A
-# released version never carries that suffix, so here it is simply the released version as well.
-# Without this, the attribute keeps the value "release-1-create-branch.sh" derived when the branch
-# was cut, and a second release from the same branch (0.13.1 after 0.13.0) leaves the branch
-# claiming two different versions - the snippets updated above, the runbooks one release behind.
-# Older branches may not have the attribute at all, and that is not worth aborting a finished
-# release over.
-if grep -qE "^[[:space:]]*current-full-version:" "$ANTORA_DESCRIPTOR"; then
- if ! sed_in_place "$ANTORA_DESCRIPTOR" -E \
- "s|^([[:space:]]*)current-full-version:.*|\\1current-full-version: '$RELEASED_VERSION'|"; then
- echo "β Got non-0 exit code from updating 'current-full-version', aborting."
- exit 1
- fi
- echo "β
'$ANTORA_DESCRIPTOR' now names $RELEASED_VERSION in its release runbooks."
-else
- echo "β οΈ '$ANTORA_DESCRIPTOR' has no 'current-full-version' attribute, skipping it."
-fi
-
-# The copy of the download page on this branch is what ".../plc4x/latest/users/download.html"
-# will be served from, so it has to list the release too.
-update_download_page "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc" \
- "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
-
-if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
- if ! git -C "$DIRECTORY" add "$ANTORA_DESCRIPTOR" \
- "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc"; then
- echo "β Got non-0 exit code from adding the Antora descriptor, aborting."
- exit 1
- fi
- if ! git -C "$DIRECTORY" commit -m "chore: published the documentation of $RELEASED_VERSION as the current release."; then
- echo "β Got non-0 exit code from committing the Antora descriptor, aborting."
- exit 1
- fi
- if ! git -C "$DIRECTORY" push; then
- echo "β Got non-0 exit code from pushing the Antora descriptor, aborting."
- exit 1
- fi
-else
- echo "β
The Antora descriptor was already up to date."
-fi
-
-########################################################################################################################
-# 2. Update the website configuration on "develop"
-########################################################################################################################
-
-# Two things have to happen on "develop" for this release to show up on the website:
-#
-# - the release branch has to be listed in the "content.sources" list of
-# website/antora-playbook.yml, because Antora only reads the branches listed there - without
-# it the descriptor changed above has no effect at all
-# - the released version has to be added to website/resources/plc4x-doap.rdf, which is what
-# Apache's tooling reads to keep track of the project's release activity
-#
-# Both files live on "develop", which is not the branch we are on, so the edits are made in a
-# throw-away worktree and pushed straight to "develop" - the release branch stays checked out in
-# the working copy the release manager is using.
-
-if ! git -C "$DIRECTORY" fetch origin develop; then
- echo "β Got non-0 exit code from fetching 'develop', aborting."
- exit 1
-fi
-
-DEVELOP_WORKTREE=$(mktemp -d)
-cleanup_develop_worktree() {
- git -C "$DIRECTORY" worktree remove --force "$DEVELOP_WORKTREE" >/dev/null 2>&1
- rm -rf "$DEVELOP_WORKTREE"
- # If the remove failed the directory is gone but the .git/worktrees entry is not, so prune it.
- git -C "$DIRECTORY" worktree prune >/dev/null 2>&1
-}
-trap cleanup_develop_worktree EXIT
-
-# A detached worktree, so this works even if "develop" happens to be checked out somewhere else.
-rmdir "$DEVELOP_WORKTREE"
-if ! git -C "$DIRECTORY" worktree add --detach "$DEVELOP_WORKTREE" origin/develop; then
- echo "β Got non-0 exit code from creating a worktree for 'develop', aborting."
- exit 1
-fi
-
-PLAYBOOK="$DEVELOP_WORKTREE/website/antora-playbook.yml"
-DOAP="$DEVELOP_WORKTREE/website/resources/plc4x-doap.rdf"
-for f in "$PLAYBOOK" "$DOAP"; do
- if [[ ! -f "$f" ]]; then
- echo "β '$f' not found, aborting."
- exit 1
- fi
-done
-
-CHANGES=()
-
-########################################################################################################################
-# 2a. Add the release branch to the Antora playbook
-########################################################################################################################
-
-if grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK"; then
- echo "β
'$RELEASE_BRANCH' is already listed in the Antora playbook."
-else
- # Insert directly after the first "start_path", which ends the "develop" source, so the
- # release branches stay listed newest first.
- if ! awk -v branch="$RELEASE_BRANCH" '
- BEGIN { done = 0 }
- { print }
- !done && /^[[:space:]]*start_path: website\/asciidoc[[:space:]]*$/ {
- print " - url: https://github.com/apache/plc4x.git"
- print " branches: [\x27" branch "\x27]"
- print " start_path: website/asciidoc"
- done = 1
- }
- ' "$PLAYBOOK" > "$PLAYBOOK.tmp"; then
- echo "β Got non-0 exit code from adding '$RELEASE_BRANCH' to the playbook, aborting."
- exit 1
- fi
- if ! grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK.tmp"; then
- echo "β Could not add '$RELEASE_BRANCH' to the Antora playbook, aborting."
- echo " The 'content.sources' list does not look the way this script expects."
- rm -f "$PLAYBOOK.tmp"
- exit 1
- fi
- mv "$PLAYBOOK.tmp" "$PLAYBOOK"
- CHANGES+=("website/antora-playbook.yml")
- echo "β
'$RELEASE_BRANCH' added to the Antora playbook."
-fi
-
-########################################################################################################################
-# 2b. Add the released version to the DOAP file
-########################################################################################################################
-
-if grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP"; then
- echo "β
$RELEASED_VERSION is already listed in the DOAP file."
-else
- RELEASE_DATE=$(date +%Y-%m-%d)
- # The newest release is the one named "Latest", all the others are "Legacy", so the entry
- # that held the title up to now has to hand it over before the new one is inserted at the top.
- if ! sed_in_place "$DOAP" -E "s|<name>Latest ([0-9][^<]*) release</name>|<name>Legacy \1 release</name>|"; then
- echo "β Got non-0 exit code from demoting the previous release in the DOAP file, aborting."
- exit 1
- fi
- if ! awk -v version="$RELEASED_VERSION" -v released="$RELEASE_DATE" '
- BEGIN { done = 0 }
- !done && /^[[:space:]]*<release>[[:space:]]*$/ {
- print " <release>"
- print " <Version>"
- print " <name>Latest " version " release</name>"
- print " <created>" released "</created>"
- print " <revision>" version "</revision>"
- print " </Version>"
- print " </release>"
- done = 1
- }
- { print }
- ' "$DOAP" > "$DOAP.tmp"; then
- echo "β Got non-0 exit code from adding $RELEASED_VERSION to the DOAP file, aborting."
- exit 1
- fi
- if ! grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP.tmp"; then
- echo "β Could not add $RELEASED_VERSION to the DOAP file, aborting."
- echo " The list of <release> entries does not look the way this script expects."
- rm -f "$DOAP.tmp"
- exit 1
- fi
- mv "$DOAP.tmp" "$DOAP"
- CHANGES+=("website/resources/plc4x-doap.rdf")
- echo "β
$RELEASED_VERSION added to the DOAP file, released on $RELEASE_DATE."
-fi
-
-########################################################################################################################
-# 2c. Add the release to the download page
-########################################################################################################################
-
-# "develop" has its own copy of the download page, published as ".../plc4x/pre-release/...". The
-# notes are taken from the RELEASE_NOTES of the release branch, because the ones on "develop" have
-# already moved on to the next version.
-
-DOWNLOAD_PAGE="$DEVELOP_WORKTREE/website/asciidoc/modules/users/pages/download.adoc"
-DOWNLOAD_PAGE_BEFORE=$(cksum < "$DOWNLOAD_PAGE")
-update_download_page "$DOWNLOAD_PAGE" "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
-if [[ "$(cksum < "$DOWNLOAD_PAGE")" != "$DOWNLOAD_PAGE_BEFORE" ]]; then
- CHANGES+=("website/asciidoc/modules/users/pages/download.adoc")
-fi
-
-########################################################################################################################
-# 2d. Commit and push whatever changed
-########################################################################################################################
-
-if [[ ${#CHANGES[@]} -eq 0 ]]; then
- echo "β
The website configuration on 'develop' was already up to date."
-else
- if ! git -C "$DEVELOP_WORKTREE" add "${CHANGES[@]}"; then
- echo "β Got non-0 exit code from adding the changed files, aborting."
- exit 1
- fi
- if ! git -C "$DEVELOP_WORKTREE" commit -m "chore: added $RELEASED_VERSION to the website configuration."; then
- echo "β Got non-0 exit code from committing the changed files, aborting."
- exit 1
- fi
- if ! git -C "$DEVELOP_WORKTREE" push origin HEAD:develop; then
- echo "β Got non-0 exit code from pushing to 'develop', aborting."
- echo " Someone probably pushed to 'develop' in the meantime - re-run this script."
- exit 1
- fi
- echo "β
Pushed to 'develop': ${CHANGES[*]}"
- echo " Your local 'develop' is now behind by that commit - remember to pull it."
-fi
-
-cleanup_develop_worktree
-trap - EXIT
+# ########################################################################################################################
+# # 1. Publish the documentation of this branch as the current release (local)
+# ########################################################################################################################
+
+# # Up to this point the release branch documented the version it was going to release, but was
+# # still flagged as a prerelease, so ".../plc4x/latest/..." kept serving the previous release
+# # while the vote was running (see 'release-1-create-branch.sh'). The vote has passed, so the
+# # flag can be cleared. Antora then picks this branch as the latest version of the component
+# # and publishes it as ".../plc4x/latest/...", which at the same time demotes the previous
+# # release branch to its own version number. Nothing has to be changed on that older branch.
+# #
+# # The version is taken from the tag 'release-2-prepare-release.sh' created, so that this also
+# # does the right thing for a bugfix release, where 'release-1-create-branch.sh' never ran.
+
+# ANTORA_DESCRIPTOR="$DIRECTORY/website/asciidoc/antora.yml"
+
+# RELEASE_TAG=$(git -C "$DIRECTORY" describe --tags --abbrev=0 --match "v*" 2>/dev/null)
+# if [[ -z "$RELEASE_TAG" ]]; then
+# echo "β Could not determine the release tag of this branch, aborting."
+# echo " Are you on the release branch, and did 'release-2-prepare-release.sh' run?"
+# exit 1
+# fi
+# RELEASED_VERSION=${RELEASE_TAG#v}
+
+# # "git describe" finds the nearest tag reachable from HEAD, which on a maintenance branch that has
+# # not been prepared yet is the PREVIOUS release. Check the tag actually belongs to this branch.
+# TAG_LINE=$(echo "$RELEASED_VERSION" | cut -d. -f1,2)
+# if [[ "$RELEASE_BRANCH" != "rel/$TAG_LINE" ]]; then
+# echo "β The most recent tag is '$RELEASE_TAG', which does not belong to branch '$RELEASE_BRANCH', aborting."
+# echo " Expected a tag on the rel/$TAG_LINE line. Has 'release-2-prepare-release.sh' run on this branch?"
+# exit 1
+# fi
+
+# read -r -p "Did the vote for $RELEASED_VERSION pass and is it being released? (yes/no) " yn
+# case $yn in
+# yes ) echo "Publishing the documentation of $RELEASED_VERSION as the current release.";;
+# no ) echo "Not publishing anything. Re-run this script once the vote has passed.";
+# exit 1;;
+# * ) echo "invalid response";
+# exit 1;;
+# esac
+
+# if [[ ! -f "$ANTORA_DESCRIPTOR" ]]; then
+# echo "β Antora descriptor '$ANTORA_DESCRIPTOR' not found, aborting."
+# exit 1
+# fi
+# # Check the RELEASE_NOTES before writing anything: the download page needs them further down, and
+# # aborting halfway would leave the descriptor modified and the next run blocked by the check for a
+# # clean working tree at the top of this script.
+# if [[ -z "$(release_notes_to_asciidoc "$DIRECTORY/RELEASE_NOTES" "$RELEASED_VERSION")" ]]; then
+# echo "β Found no RELEASE_NOTES section for $RELEASED_VERSION, aborting."
+# echo " Expected a block headed 'Apache PLC4X Extras $RELEASED_VERSION' - if it still says"
+# echo " '(Unreleased) ... -SNAPSHOT', 'release-1-create-branch.sh' never finalized it."
+# exit 1
+# fi
+# if ! grep -qE "^version:" "$ANTORA_DESCRIPTOR" || ! grep -qE "^prerelease:" "$ANTORA_DESCRIPTOR"; then
+# echo "β '$ANTORA_DESCRIPTOR' has no 'version:' and/or 'prerelease:' key, aborting."
+# exit 1
+# fi
+# if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^version:.*|version: '$RELEASED_VERSION'|"; then
+# echo "β Got non-0 exit code from updating the version in the Antora descriptor, aborting."
+# exit 1
+# fi
+# if ! sed_in_place "$ANTORA_DESCRIPTOR" -E "s|^prerelease:.*|prerelease: False|"; then
+# echo "β Got non-0 exit code from clearing the prerelease flag, aborting."
+# exit 1
+# fi
+# echo "β
'$ANTORA_DESCRIPTOR' now publishes $RELEASED_VERSION as the current release."
+
+# # The dependency snippets throughout the docs of this branch ("<version>...</version>", the Gradle
+# # equivalents, the capture-replay jar name, ...) all render from a single Antora attribute. On
+# # "develop" that attribute is kept in sync with "${project.version}" by the "sync-antora-version"
+# # execution in website/pom.xml, which is correct there. It is NOT correct here:
+# # "release-2-prepare-release.sh" has already moved the poms on to the next bugfix SNAPSHOT, so
+# # "${project.version}" on this branch is something nobody can depend on (0.13.2-SNAPSHOT while
+# # 0.13.1 is what was released). Take the value from the release tag instead, so that
+# # ".../plc4x/latest/..." tells people to depend on the version that actually exists.
+# #
+# # Branches cut before the attribute was renamed still carry the old name, and this script has to
+# # keep working for a bugfix release on one of those, so accept either spelling.
+# ANTORA_VERSION_ATTRIBUTE=""
+# for candidate in current-project-version current-last-released-version; do
+# if grep -qE "^[[:space:]]*$candidate:" "$ANTORA_DESCRIPTOR"; then
+# ANTORA_VERSION_ATTRIBUTE="$candidate"
+# break
+# fi
+# done
+# if [[ -z "$ANTORA_VERSION_ATTRIBUTE" ]]; then
+# echo "β '$ANTORA_DESCRIPTOR' has neither a 'current-project-version' nor a legacy"
+# echo " 'current-last-released-version' attribute, aborting."
+# echo " Without it the documentation would advertise a version nobody can depend on."
+# exit 1
+# fi
+# if ! sed_in_place "$ANTORA_DESCRIPTOR" -E \
+# "s|^([[:space:]]*)$ANTORA_VERSION_ATTRIBUTE:.*|\\1$ANTORA_VERSION_ATTRIBUTE: '$RELEASED_VERSION'|"; then
+# echo "β Got non-0 exit code from updating '$ANTORA_VERSION_ATTRIBUTE', aborting."
+# exit 1
+# fi
+# echo "β
'$ANTORA_DESCRIPTOR' now advertises $RELEASED_VERSION in its dependency snippets."
+
+# # "current-full-version" is the same value without the "-SNAPSHOT" suffix, and it is what the
+# # release and validation runbooks of this branch render their example URLs and commands from. A
+# # released version never carries that suffix, so here it is simply the released version as well.
+# # Without this, the attribute keeps the value "release-1-create-branch.sh" derived when the branch
+# # was cut, and a second release from the same branch (0.13.1 after 0.13.0) leaves the branch
+# # claiming two different versions - the snippets updated above, the runbooks one release behind.
+# # Older branches may not have the attribute at all, and that is not worth aborting a finished
+# # release over.
+# if grep -qE "^[[:space:]]*current-full-version:" "$ANTORA_DESCRIPTOR"; then
+# if ! sed_in_place "$ANTORA_DESCRIPTOR" -E \
+# "s|^([[:space:]]*)current-full-version:.*|\\1current-full-version: '$RELEASED_VERSION'|"; then
+# echo "β Got non-0 exit code from updating 'current-full-version', aborting."
+# exit 1
+# fi
+# echo "β
'$ANTORA_DESCRIPTOR' now names $RELEASED_VERSION in its release runbooks."
+# else
+# echo "β οΈ '$ANTORA_DESCRIPTOR' has no 'current-full-version' attribute, skipping it."
+# fi
+
+# # The copy of the download page on this branch is what ".../plc4x/latest/users/download.html"
+# # will be served from, so it has to list the release too.
+# update_download_page "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc" \
+# "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
+
+# if [[ $(git -C "$DIRECTORY" status --porcelain) ]]; then
+# if ! git -C "$DIRECTORY" add "$ANTORA_DESCRIPTOR" \
+# "$DIRECTORY/website/asciidoc/modules/users/pages/download.adoc"; then
+# echo "β Got non-0 exit code from adding the Antora descriptor, aborting."
+# exit 1
+# fi
+# if ! git -C "$DIRECTORY" commit -m "chore: published the documentation of $RELEASED_VERSION as the current release."; then
+# echo "β Got non-0 exit code from committing the Antora descriptor, aborting."
+# exit 1
+# files
+# if ! git -C "$DIRECTORY" push; then
+# echo "β Got non-0 exit code from pushing the Antora descriptor, aborting."
+# exit 1
+# fi
+# else
+# echo "β
The Antora descriptor was already up to date."
+# fi
+
+# ########################################################################################################################
+# # 2. Update the website configuration on "develop"
+# ########################################################################################################################
+
+# # Two things have to happen on "develop" for this release to show up on the website:
+# #
+# # - the release branch has to be listed in the "content.sources" list of
+# # website/antora-playbook.yml, because Antora only reads the branches listed there - without
+# # it the descriptor changed above has no effect at all
+# # - the released version has to be added to website/resources/plc4x-doap.rdf, which is what
+# # Apache's tooling reads to keep track of the project's release activity
+# #
+# # Both files live on "develop", which is not the branch we are on, so the edits are made in a
+# # throw-away worktree and pushed straight to "develop" - the release branch stays checked out in
+# # the working copy the release manager is using.
+
+# if ! git -C "$DIRECTORY" fetch origin develop; then
+# echo "β Got non-0 exit code from fetching 'develop', aborting."
+# exit 1
+# fi
+
+# DEVELOP_WORKTREE=$(mktemp -d)
+# cleanup_develop_worktree() {
+# git -C "$DIRECTORY" worktree remove --force "$DEVELOP_WORKTREE" >/dev/null 2>&1
+# rm -rf "$DEVELOP_WORKTREE"
+# # If the remove failed the directory is gone but the .git/worktrees entry is not, so prune it.
+# git -C "$DIRECTORY" worktree prune >/dev/null 2>&1
+# }
+# trap cleanup_develop_worktree EXIT
+
+# # A detached worktree, so this works even if "develop" happens to be checked out somewhere else.
+# rmdir "$DEVELOP_WORKTREE"
+# if ! git -C "$DIRECTORY" worktree add --detach "$DEVELOP_WORKTREE" origin/develop; then
+# echo "β Got non-0 exit code from creating a worktree for 'develop', aborting."
+# exit 1
+# fi
+
+# PLAYBOOK="$DEVELOP_WORKTREE/website/antora-playbook.yml"
+# DOAP="$DEVELOP_WORKTREE/website/resources/plc4x-doap.rdf"
+# for f in "$PLAYBOOK" "$DOAP"; do
+# if [[ ! -f "$f" ]]; then
+# echo "β '$f' not found, aborting."
+# exit 1
+# fi
+# done
+
+# CHANGES=()
+
+# ########################################################################################################################
+# # 2a. Add the release branch to the Antora playbook
+# ########################################################################################################################
+
+# if grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK"; then
+# echo "β
'$RELEASE_BRANCH' is already listed in the Antora playbook."
+# else
+# # Insert directly after the first "start_path", which ends the "develop" source, so the
+# # release branches stay listed newest first.
+# if ! awk -v branch="$RELEASE_BRANCH" '
+# BEGIN { done = 0 }
+# { print }
+# !done && /^[[:space:]]*start_path: website\/asciidoc[[:space:]]*$/ {
+# print " - url: https://github.com/apache/plc4x.git"
+# print " branches: [\x27" branch "\x27]"
+# print " start_path: website/asciidoc"
+# done = 1
+# }
+# ' "$PLAYBOOK" > "$PLAYBOOK.tmp"; then
+# echo "β Got non-0 exit code from adding '$RELEASE_BRANCH' to the playbook, aborting."
+# exit 1
+# fi
+# if ! grep -q "'$RELEASE_BRANCH'" "$PLAYBOOK.tmp"; then
+# echo "β Could not add '$RELEASE_BRANCH' to the Antora playbook, aborting."
+# echo " The 'content.sources' list does not look the way this script expects."
+# rm -f "$PLAYBOOK.tmp"
+# exit 1
+# fi
+# mv "$PLAYBOOK.tmp" "$PLAYBOOK"
+# CHANGES+=("website/antora-playbook.yml")
+# echo "β
'$RELEASE_BRANCH' added to the Antora playbook."
+# fi
+
+# ########################################################################################################################
+# # 2b. Add the released version to the DOAP file
+# ########################################################################################################################
+
+# if grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP"; then
+# echo "β
$RELEASED_VERSION is already listed in the DOAP file."
+# else
+# RELEASE_DATE=$(date +%Y-%m-%d)
+# # The newest release is the one named "Latest", all the others are "Legacy", so the entry
+# # that held the title up to now has to hand it over before the new one is inserted at the top.
+# if ! sed_in_place "$DOAP" -E "s|<name>Latest ([0-9][^<]*) release</name>|<name>Legacy \1 release</name>|"; then
+# echo "β Got non-0 exit code from demoting the previous release in the DOAP file, aborting."
+# exit 1
+# fi
+# if ! awk -v version="$RELEASED_VERSION" -v released="$RELEASE_DATE" '
+# BEGIN { done = 0 }
+# !done && /^[[:space:]]*<release>[[:space:]]*$/ {
+# print " <release>"
+# print " <Version>"
+# print " <name>Latest " version " release</name>"
+# print " <created>" released "</created>"
+# print " <revision>" version "</revision>"
+# print " </Version>"
+# print " </release>"
+# done = 1
+# }
+# { print }
+# ' "$DOAP" > "$DOAP.tmp"; then
+# echo "β Got non-0 exit code from adding $RELEASED_VERSION to the DOAP file, aborting."
+# exit 1
+# fi
+# if ! grep -q "<revision>$RELEASED_VERSION</revision>" "$DOAP.tmp"; then
+# echo "β Could not add $RELEASED_VERSION to the DOAP file, aborting."
+# echo " The list of <release> entries does not look the way this script expects."
+# rm -f "$DOAP.tmp"
+# exit 1
+# fi
+# mv "$DOAP.tmp" "$DOAP"
+# CHANGES+=("website/resources/plc4x-doap.rdf")
+# echo "β
$RELEASED_VERSION added to the DOAP file, released on $RELEASE_DATE."
+# fi
+
+# ########################################################################################################################
+# # 2c. Add the release to the download page
+# ########################################################################################################################
+
+# # "develop" has its own copy of the download page, published as ".../plc4x/pre-release/...". The
+# # notes are taken from the RELEASE_NOTES of the release branch, because the ones on "develop" have
+# # already moved on to the next version.
+
+# DOWNLOAD_PAGE="$DEVELOP_WORKTREE/website/asciidoc/modules/users/pages/download.adoc"
+# DOWNLOAD_PAGE_BEFORE=$(cksum < "$DOWNLOAD_PAGE")
+# update_download_page "$DOWNLOAD_PAGE" "$RELEASED_VERSION" "$DIRECTORY/RELEASE_NOTES"
+# if [[ "$(cksum < "$DOWNLOAD_PAGE")" != "$DOWNLOAD_PAGE_BEFORE" ]]; then
+# CHANGES+=("website/asciidoc/modules/users/pages/download.adoc")
+# fi
+
+# ########################################################################################################################
+# # 2d. Commit and push whatever changed
+# ########################################################################################################################
+
+# if [[ ${#CHANGES[@]} -eq 0 ]]; then
+# echo "β
The website configuration on 'develop' was already up to date."
+# else
+# if ! git -C "$DEVELOP_WORKTREE" add "${CHANGES[@]}"; then
+# echo "β Got non-0 exit code from adding the changed files, aborting."
+# exit 1
+# fi
+# if ! git -C "$DEVELOP_WORKTREE" commit -m "chore: added $RELEASED_VERSION to the website configuration."; then
+# echo "β Got non-0 exit code from committing the changed files, aborting."
+# exit 1
+# files
+# if ! git -C "$DEVELOP_WORKTREE" push origin HEAD:develop; then
+# echo "β Got non-0 exit code from pushing to 'develop', aborting."
+# echo " Someone probably pushed to 'develop' in the meantime - re-run this script."
+# exit 1
+# fi
+# echo "β
Pushed to 'develop': ${CHANGES[*]}"
+# echo " Your local 'develop' is now behind by that commit - remember to pull it."
+# fi
+
+# cleanup_develop_worktree
+# trap - EXIT
# NOTE: Old releases are not removed from the Antora playbook automatically - decide for yourself
# how many of them the website should keep building.
@@ -552,7 +552,7 @@ VOTES_NON_PMC=${VOTES_NON_PMC:-0}
cat > "$STAGE_DIR/result-email.eml" <<EOF
To: dev@plc4x.apache.org
-Subject: [RESULT] [VOTE] Apache PLC4X $RELEASED_VERSION $(echo "$RELEASE_CANDIDATE_LABEL" | tr '[:lower:]' '[:upper:]')
+Subject: [RESULT] [VOTE] Apache PLC4X Extras $RELEASED_VERSION $(echo "$RELEASE_CANDIDATE_LABEL" | tr '[:lower:]' '[:upper:]')
Content-Type: text/plain; charset=UTF-8
So, the vote passes with $VOTES_PMC +1 votes by PMC members and $VOTES_NON_PMC +1 votes by non PMC members.
@@ -567,10 +567,10 @@ echo "β
Result email generated to $STAGE_DIR/result-email.eml"
cat > "$STAGE_DIR/announce-email.eml" <<EOF
To: announce@apache.org
Cc: dev@plc4x.apache.org
-Subject: [ANNOUNCE] Apache PLC4X $RELEASED_VERSION released
+Subject: [ANNOUNCE] Apache PLC4X Extras $RELEASED_VERSION released
Content-Type: text/plain; charset=UTF-8
-The Apache PLC4X team is pleased to announce the release of Apache PLC4X $RELEASED_VERSION
+The Apache PLC4X team is pleased to announce the release of Apache PLC4X Extras $RELEASED_VERSION
PLC4X is a set of libraries for communicating with industrial programmable
logic controllers (PLCs) using a variety of protocols but with a shared API.
@@ -657,7 +657,7 @@ else
fi
echo
- echo "About to publish Apache PLC4X $RELEASED_VERSION. This cannot be undone:"
+ echo "About to publish Apache PLC4X Extras $RELEASED_VERSION. This cannot be undone:"
echo " - SVN: $DIST_DEV/$RELEASED_VERSION/$RELEASE_CANDIDATE"
echo " -> $DIST_RELEASE/$RELEASED_VERSION"
echo " - Nexus: releasing staging repository '$STAGING_REPO_ID' to the Apache release repo,"
@@ -671,7 +671,7 @@ else
exit 1;;
esac
- if ! svn move -m "Release Apache PLC4X $RELEASED_VERSION" \
+ if ! svn move -m "Release Apache PLC4X Extras $RELEASED_VERSION" \
"$DIST_DEV/$RELEASED_VERSION/$RELEASE_CANDIDATE" \
"$DIST_RELEASE/$RELEASED_VERSION"; then
echo "β Got non-0 exit code from moving the release candidate in SVN, aborting."
@@ -710,7 +710,7 @@ if [[ "$SVN_ALREADY_PUBLISHED" == "true" ]]; then
fi
if [[ -n "$STAGING_REPO_ID" ]]; then
-if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/../tools/stage.pom" nexus-staging:rc-release \
+if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-release \
-DstagingRepositoryId="$STAGING_REPO_ID" -DstagingProfileId=$STAGING_PROFILE_ID; then
echo "β Got non-0 exit code from releasing the Nexus staging repository."
echo " If it was already released, this is expected and can be ignored - check"
@@ -898,7 +898,7 @@ echo
echo "Staging repositories currently on $NEXUS_URL:"
# No "-q" here: the repository table is printed at INFO level, and quiet mode would leave the
# prompt below asking for ids from a listing that was never shown.
-if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/../tools/stage.pom" nexus-staging:rc-list; then
+if ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-list; then
echo "β οΈ Could not list the staging repositories - check them by hand at"
echo " $NEXUS_URL under 'Staging Repositories'."
else
@@ -913,7 +913,7 @@ else
read -r -p "Really drop '$DROP_REPOS'? (yes/no) " yn
if [[ "$yn" != "yes" ]]; then
echo "β
Keeping all staging repositories."
- elif ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/../tools/stage.pom" nexus-staging:rc-drop \
+ elif ! MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -f "$DIRECTORY/tools/stage.pom" nexus-staging:rc-drop \
-DstagingRepositoryId="$DROP_REPOS"; then
echo "β Got non-0 exit code from dropping the staging repositories, aborting."
exit 1
diff --git a/tools/release-abort.sh b/tools/release-abort.sh
index 648b5c17..25101770 100755
--- a/tools/release-abort.sh
+++ b/tools/release-abort.sh
@@ -23,7 +23,7 @@
# directory it is started from. This used to be "$(pwd)" with a "find .." further down, which
# deleted files from the PARENT of the checkout - and that is where the plc4x-build-tools and
# plc4x-extras checkouts usually live - whenever the script was not started from "tools".
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
########################################################################################################################
# 1. Work out what to roll the versions back to
@@ -64,8 +64,8 @@ echo "Release tag: $TAG_NAME"
# 2. Set the versions back (Docker container)
########################################################################################################################
-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,update-generated-code \
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
+ bash /ws/mvnw -e -P with-c,with-go,with-java, \
-Dmaven.repo.local=/ws/out/.repository versions:set -DprocessAllModules=true -DnewVersion="$PRE_RELEASE_VERSION"; then
echo "β Got non-0 exit code from setting the versions back, aborting."
exit 1
@@ -131,9 +131,8 @@ cat <<EOF
Not undone by this script - check these by hand:
- Commits already pushed to 'develop' by 'release-1-create-branch.sh': the finalized
- RELEASE_NOTES, the new section for the next version and the version in
- website/asciidoc/antora.yml.
- - A release candidate staged in SVN under https://dist.apache.org/repos/dist/dev/plc4x/
+ RELEASE_NOTES, the new section for the next version.
+ - A release candidate staged in SVN under https://dist.apache.org/repos/dist/dev/plc4x/plc4x-extras
("svn rm" it).
- A Nexus staging repository opened by 'release-2-prepare-release.sh'
(drop it at https://repository.apache.org).
diff --git a/tools/release-common.sh b/tools/release-common.sh
index 6a9c7b14..490b733c 100644
--- a/tools/release-common.sh
+++ b/tools/release-common.sh
@@ -41,6 +41,6 @@ NEXUS_MAVEN_OPTS="${MAVEN_OPTS:+$MAVEN_OPTS }--add-opens java.base/java.util=ALL
# Where release candidates are staged and where releases end up. Everything below
# https://dist.apache.org/repos/dist/ needs an Apache committer account to write to.
DIST_BASE="https://dist.apache.org/repos/dist"
-DIST_DEV="$DIST_BASE/dev/plc4x"
-DIST_RELEASE="$DIST_BASE/release/plc4x"
-KEYS_URL="$DIST_RELEASE/KEYS"
+DIST_DEV="$DIST_BASE/dev/plc4x/plc4x-extras"
+DIST_RELEASE="$DIST_BASE/release/plc4x/plc4x-extras"
+KEYS_URL="$DIST_BASE/release/plc4x/KEYS"
diff --git a/tools/release-preflight.sh b/tools/release-preflight.sh
index f461cd88..b9610ed3 100755
--- a/tools/release-preflight.sh
+++ b/tools/release-preflight.sh
@@ -34,16 +34,16 @@
#
# It is meant to be run at the start of the release scripts, and can be run on its own at any time.
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
echo $DIRECTORY
-if [[ ! -f "$DIRECTORY/../tools/release-common.sh" ]]; then
- echo "β '$DIRECTORY/../tools/release-common.sh' not found, aborting."
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "β '$DIRECTORY/tools/release-common.sh' not found, aborting."
exit 1
fi
# shellcheck source=release-common.sh
-source "$DIRECTORY/../tools/release-common.sh"
+source "$DIRECTORY/tools/release-common.sh"
OFFLINE=false
if [[ "$1" == "--offline" ]]; then
@@ -204,7 +204,7 @@ if [[ "$OFFLINE" == false ]]; then
# credentials, same "stage.pom", so it fails in exactly the same way a stale password would
# fail an hour into the release. Letting Maven do the call also means the credentials are
# read and decrypted the way Maven does it, rather than parsed out of settings.xml here.
- NEXUS_OUTPUT=$(MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -q -f "$DIRECTORY/../tools/stage.pom" \
+ NEXUS_OUTPUT=$(MAVEN_OPTS="$NEXUS_MAVEN_OPTS" "$DIRECTORY/mvnw" -q -f "$DIRECTORY/tools/stage.pom" \
nexus-staging:rc-list -DstagingProfileId="$STAGING_PROFILE_ID" 2>&1)
NEXUS_STATUS=$?
if [[ $NEXUS_STATUS -eq 0 ]]; then
diff --git a/tools/stage.pom b/tools/stage.pom
index 2435d90e..8a6c2257 100644
--- a/tools/stage.pom
+++ b/tools/stage.pom
@@ -23,7 +23,7 @@
http://maven.apache.org/xsd/maven-4.1.0.xsd">
<modelVersion>4.1.0</modelVersion>
- <groupId>org.apache.plc4x</groupId>
+ <groupId>org.apache.plc4x.extras</groupId>
<artifactId>deploy-wrapper</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
diff --git a/tools/validate-release.sh b/tools/validate-release.sh
index 6c0c9ca3..c3d98360 100755
--- a/tools/validate-release.sh
+++ b/tools/validate-release.sh
@@ -21,14 +21,14 @@
# Resolve the project directory from the location of this script, so that it does not matter which
# directory it is started from.
-DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/../plc4x-extras" && pwd)"
+DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# Values shared with the other release scripts (Nexus staging profile, dist.apache.org URLs).
-if [[ ! -f "$DIRECTORY/../tools/release-common.sh" ]]; then
- echo "β '$DIRECTORY/../tools/release-common.sh' not found, aborting."
+if [[ ! -f "$DIRECTORY/tools/release-common.sh" ]]; then
+ echo "β '$DIRECTORY/tools/release-common.sh' not found, aborting."
exit 1
fi
# shellcheck source=release-common.sh
-source "$DIRECTORY/../tools/release-common.sh"
+source "$DIRECTORY/tools/release-common.sh"
########################################################################################################################
@@ -76,7 +76,7 @@ if [[ "$PROJECT_VERSION" =~ -SNAPSHOT$ ]]; then
echo " or check out the release tag."
exit 1
fi
-echo "β
Validating Apache PLC4X $PROJECT_VERSION"
+echo "β
Validating Apache PLC4X Extras $PROJECT_VERSION"
########################################################################################################################
# 2. Do a simple release-perform command skip signing of artifacts and deploy to local directory
@@ -84,14 +84,14 @@ echo "β
Validating Apache PLC4X $PROJECT_VERSION"
########################################################################################################################
echo "Validate Release:"
-if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" build; then
+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
fi
# Only the Java artifacts are compared: the C, .Net and Python ones are either platform specific or
# not published to Maven at all, so there is nothing in the staging repository to compare them to.
-if ! docker compose -f "$DIRECTORY/../tools/docker-compose.yaml" run releaser \
+if ! docker compose -f "$DIRECTORY/tools/docker-compose.yaml" run releaser \
bash /ws/mvnw -e -P with-java -Dmaven.repo.local=/ws/out/.repository \
-Dreference.repo="$NEXUS_URL/content/repositories/staging/" \
-Dbuildinfo.reproducible verify artifact:compare; then