You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2022/12/27 08:40:50 UTC

[logging-log4j-tools] branch master updated (1e9e66f -> 255b5d9)

This is an automated email from the ASF dual-hosted git repository.

vy pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git


    from 1e9e66f  Create `log4j-tools-bom` and `log4j-tools-parent` POMs
     new 1235bc8  Fix comment typo in parent's POM
     new 255b5d9  Improve `build.yml` workflow for releases

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++----------------
 log4j-tools-parent/pom.xml  |  2 +-
 2 files changed, 31 insertions(+), 17 deletions(-)


[logging-log4j-tools] 01/02: Fix comment typo in parent's POM

Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git

commit 1235bc83e2b44ff39367d59c579ee2d44abc6950
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Tue Dec 27 09:31:34 2022 +0100

    Fix comment typo in parent's POM
---
 log4j-tools-parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log4j-tools-parent/pom.xml b/log4j-tools-parent/pom.xml
index 7ebb4a1..6885985 100644
--- a/log4j-tools-parent/pom.xml
+++ b/log4j-tools-parent/pom.xml
@@ -38,7 +38,7 @@
     <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
-    <!-- `minimalJavaBuildVersion` is employed by `org.apache:apache`, which is the parent of `org.apache.logging:logging-parent`, which is the parent of us.
+    <!-- `minimalJavaBuildVersion` is employed by `org.apache:apache`, which parents `org.apache.logging:logging-parent`, which parents `org.apache.logging.log4j.tools:log4j-tools-bom`, which parents us.
          `minimalJavaBuildVersion` is used for enforcing the compiler version.
          We will use `java.version` to enforce the target JVM byte code, which is 8. -->
     <minimalJavaBuildVersion>[11,12)</minimalJavaBuildVersion>


[logging-log4j-tools] 02/02: Improve `build.yml` workflow for releases

Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git

commit 255b5d9866d12c0d9f8bf66e25b7e64c66c26b81
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Tue Dec 27 09:41:35 2022 +0100

    Improve `build.yml` workflow for releases
---
 .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++----------------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ba1b257..0682d09 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -129,42 +129,41 @@ jobs:
 
       - name: Export artifact version
         run: |
-          ./mvnw \
+          export PROJECT_VERSION=$(./mvnw \
             --quiet --batch-mode -DforceStdout=true \
             -Dexpression=project.version \
             help:evaluate \
-            | tee /tmp/mvnw-project-version.out
+            | tail -n 1)
+          echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
 
       - name: Check version (SNAPSHOT)
         if: github.ref == 'refs/heads/master'
         run: |
-          export REVISION=$(</tmp/mvnw-project-version.out)
-          [[ "$REVISION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT$ ]] || {
-            echo "was expecting a snapshot version, found: $REVISION" 1>&2
+          [[ "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT$ ]] || {
+            echo "was expecting a snapshot version, found: \"$PROJECT_VERSION\"" 1>&2
             exit 1
           }
 
       - name: Check version (RELEASE)
         if: startsWith(github.ref, 'refs/heads/release/')
         run: |
-          export REVISION=$(</tmp/mvnw-project-version.out)
-          [[ "${GITHUB_REF/refs\/heads\/release\//}" == "$REVISION" ]] || {
-            echo "git ref \"$GITHUB_REF\" mismatches with the version: \"$REVISION\"" 1>&2
+          [[ "${GITHUB_REF/refs\/heads\/release\//}" == "$PROJECT_VERSION" ]] || {
+            echo "git ref \"$GITHUB_REF\" mismatches with the version: \"$PROJECT_VERSION\"" 1>&2
             exit 1
           }
-          [[ "$REVISION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
-            echo "was expecting a release version, found: \"$REVISION\"" 1>&2
+          [[ "$PROJECT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || {
+            echo "was expecting a release version, found: \"$PROJECT_VERSION\"" 1>&2
             exit 1
           }
           export CHANGELOG_VERSION=$(grep "^== " CHANGELOG.adoc | head -n 1 | sed -r 's/^== (.+) \(.+\)$/\1/')
-          [[ "$REVISION" == "$CHANGELOG_VERSION" ]] || {
-            echo "version \"$REVISION\" doesn't match the one in the CHANGELOG: \"$CHANGELOG_VERSION\"" 1>&2
+          [[ "$PROJECT_VERSION" == "$CHANGELOG_VERSION" ]] || {
+            echo "version \"$PROJECT_VERSION\" doesn't match the one in changelog: \"$CHANGELOG_VERSION\"" 1>&2
             exit 1
           }
           export CURRENT_DATE=$(date +%Y-%m-%d)
           export CHANGELOG_DATE=$(grep "^== " CHANGELOG.adoc | head -n 1 | sed -r 's/^== .+ \((.+)\)$/\1/')
           [[ "$CURRENT_DATE" == "$CHANGELOG_DATE" ]] || {
-            echo "current date \"$CURRENT_DATE\" doesn't match the one in the CHANGELOG: \"$CHANGELOG_DATE\"" 1>&2
+            echo "current date \"$CURRENT_DATE\" doesn't match the one in the changelog: \"$CHANGELOG_DATE\"" 1>&2
             exit 1
           }
 
@@ -185,12 +184,27 @@ jobs:
           NEXUS_USER: ${{ secrets.NEXUS_USER }}
           NEXUS_PW: ${{ secrets.NEXUS_PW }}
 
+      - name: Create artifacts (RELEASE)
+        if: startsWith(github.ref, 'refs/heads/release/')
+        run: |
+          git ls-files -z | xargs -0 /tmp/src.zip --
+          gpg --armor --sign --yes --pinentry-mode error /tmp/src.zip
+
+      - name: Upload artifacts (RELEASE)
+        if: startsWith(github.ref, 'refs/heads/release/')
+        uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb   # 3.1.1
+        with:
+          name: Sources
+          path: |
+            /tmp/src.zip
+            /tmp/src.zip.asc
+        if-no-files-found: error
+
       - name: Tag version (RELEASE)
         if: startsWith(github.ref, 'refs/heads/release/')
         run: |
-          export REVISION=$(</tmp/mvnw-project-version.out)
-          export TAG="v$REVISION"
+          export TAG="v$PROJECT_VERSION"
           git config user.name github-actions
           git config user.email github-actions@github.com
-          git tag "$TAG"
+          git tag --sign "$TAG"
           git push origin "$TAG"