From 04ece2944ce6f42b469a724bf9241072052ba1a3 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Fri, 16 Feb 2024 18:02:06 +0100 Subject: [PATCH] build: Merged changes back from the release branch. --- RELEASE_NOTES | 1 + code-generation/language-c/pom.xml | 2 + code-generation/language-go/pom.xml | 2 + code-generation/language-python/pom.xml | 4 + .../test/resources/integration-test/pom.xml | 96 ++----------------- tools/release-3-perform-release.sh | 28 +++--- 6 files changed, 31 insertions(+), 102 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 9a5f6dcd00a..0965925b757 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -11,6 +11,7 @@ Incompatible changes Bug Fixes --------- +============================================================== Apache PLC4X 0.12.0 ============================================================== diff --git a/code-generation/language-c/pom.xml b/code-generation/language-c/pom.xml index be7ac94ce55..de47ba49b4a 100644 --- a/code-generation/language-c/pom.xml +++ b/code-generation/language-c/pom.xml @@ -56,6 +56,8 @@ ${skip-code-generation-tests} true + + test true ${project.build.directory}/local-repo src/test/resources diff --git a/code-generation/language-go/pom.xml b/code-generation/language-go/pom.xml index c57b2c34980..2bc6ce9ffaa 100644 --- a/code-generation/language-go/pom.xml +++ b/code-generation/language-go/pom.xml @@ -56,6 +56,8 @@ ${skip-code-generation-tests} true + + test true ${project.build.directory}/local-repo src/test/resources diff --git a/code-generation/language-python/pom.xml b/code-generation/language-python/pom.xml index b994c53e962..3653c065d7e 100644 --- a/code-generation/language-python/pom.xml +++ b/code-generation/language-python/pom.xml @@ -33,6 +33,8 @@ Code generation template for generating Python code + + true 2024-02-16T14:53:02Z @@ -55,6 +57,8 @@ ${skip-code-generation-tests} true + + test true ${project.build.directory}/local-repo src/test/resources diff --git a/code-generation/language-python/src/test/resources/integration-test/pom.xml b/code-generation/language-python/src/test/resources/integration-test/pom.xml index 550b1281e6c..596cd238ebf 100644 --- a/code-generation/language-python/src/test/resources/integration-test/pom.xml +++ b/code-generation/language-python/src/test/resources/integration-test/pom.xml @@ -28,14 +28,14 @@ ../../../.. - plc4j-java-mspec-test + plc4py-python-mspec-test - PLC4J: Driver: Java Mspec Test + PLC4PY: Driver: Python Mspec Test - + - features-generate-descriptor - - verify - - - true - true - - - - build-kar - package - - - kar - - - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.groupId}.${project.artifactId} - org.apache.plc4x.java.osgi.DriverActivator - org.apache.plc4x.java.api.PlcDriver,org.apache.plc4x.protocol.test - - - * - - - - + org.apache.maven.plugins maven-dependency-plugin - org.apache.plc4x:plc4x-code-generation-language-java + org.apache.plc4x:plc4x-code-generation-language-python org.apache.plc4x:plc4x-code-generation-protocol-test @@ -137,44 +90,9 @@ - - org.apache.plc4x - plc4j-api - @project.version@ - - - - org.apache.plc4x - plc4j-spi - @project.version@ - - - - org.apache.plc4x - plc4j-transport-tcp - @project.version@ - - - - io.netty - netty-buffer - - - - org.apache.commons - commons-lang3 - - - - org.apache.plc4x - plc4j-utils-test-utils - @project.version@ - test - - org.apache.plc4x - plc4x-code-generation-language-java + plc4x-code-generation-language-python @project.version@ provided diff --git a/tools/release-3-perform-release.sh b/tools/release-3-perform-release.sh index acc3f263425..d557e9a048a 100755 --- a/tools/release-3-perform-release.sh +++ b/tools/release-3-perform-release.sh @@ -31,32 +31,34 @@ 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 +find ../out/.local-artifacts-dir -print | grep -E '^((.*\.pom)|(.*\.jar)|(.*\.kar)|(.*\.nar)|(.*-features\.xml)|(.*-cyclonedx\.json)|(.*-cyclonedx\.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 +../mvnw -f ../jenkins.pom -X -P deploy-releases wagon:upload # 4. Prepare a directory for the release candidate echo "Staging release candidate:" +read -r -p 'Release-Candidate number: ' rcNumber +RELEASE_CANDIDATE="rc$rcNumber" 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" -cp ../RELEASE_NOTES "../out/stage/${RELEASE_VERSION}/rc1" -cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip" "../out/stage/${RELEASE_VERSION}/rc1/apache-plc4x-${RELEASE_VERSION}-source-release.zip" -cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.asc" "../out/stage/${RELEASE_VERSION}/rc1/apache-plc4x-${RELEASE_VERSION}-source-release.zip.asc" -cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.sha512" "../out/stage/${RELEASE_VERSION}/rc1/apache-plc4x-${RELEASE_VERSION}-source-release.zip.sha512" +mkdir -p "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}" +cp ../README.md "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/README" +cp ../RELEASE_NOTES "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.asc" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip.asc" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-source-release.zip.sha512" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-source-release.zip.sha512" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.json" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.json" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.json.asc" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.json.asc" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.xml" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.xml" +cp "../out/.local-artifacts-dir/org/apache/plc4x/plc4x-parent/${RELEASE_VERSION}/plc4x-parent-${RELEASE_VERSION}-cyclonedx.xml.asc" "../out/stage/${RELEASE_VERSION}/${RELEASE_CANDIDATE}/apache-plc4x-${RELEASE_VERSION}-cyclonedx.xml.asc" # 5. Upload the release candidate artifacts to SVN cd "../out/stage/${RELEASE_VERSION}" || exit -svn import rc1 "https://dist.apache.org/repos/dist/dev/plc4x/${RELEASE_VERSION}/rc1" -m"Staging of rc1 of PLC4X ${RELEASE_VERSION}" +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}" # 6. Close the Nexus staging repository