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 2023/09/06 07:51:11 UTC

[logging-parent] branch main updated (2b47c12 -> 4da8daf)

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

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


    from 2b47c12  Remove debugging aid
     new 6d0c523  Improve SVN path in `generate-emails.sh`
     new 4da8daf  Split distribution into source and binary components

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/generate-email.sh                     |  3 ++-
 .github/workflows/deploy-release-reusable.yml | 17 +++++++++++------
 pom.xml                                       | 22 +++++++++++++---------
 3 files changed, 26 insertions(+), 16 deletions(-)


[logging-parent] 02/02: Split distribution into source and binary components

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

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

commit 4da8daf0d7e2dfe1f68c47dabb386ff9c8fa62ec
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Wed Sep 6 09:50:58 2023 +0200

    Split distribution into source and binary components
---
 .github/workflows/deploy-release-reusable.yml | 17 +++++++++++------
 pom.xml                                       | 22 +++++++++++++---------
 2 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/deploy-release-reusable.yml b/.github/workflows/deploy-release-reusable.yml
index 0664aed..de6d749 100644
--- a/.github/workflows/deploy-release-reusable.yml
+++ b/.github/workflows/deploy-release-reusable.yml
@@ -108,14 +108,19 @@ jobs:
             -DattachmentCount=${{ inputs.distribution-attachment-count }}
           export DIST_FILENAME_PREFIX="apache-${{ inputs.project-name }}"
           export DIST_FILENAME_VERSIONED_PREFIX="${DIST_FILENAME_PREFIX}-${PROJECT_VERSION}"
-          export DIST_FILEPATH="/tmp/${DIST_FILENAME_VERSIONED_PREFIX}.zip"
-          mv "target/dist.zip" "$DIST_FILEPATH"
-          gpg --armor --detach-sign --yes --pinentry-mode error "$DIST_FILEPATH"
-          sha512sum "$DIST_FILEPATH" > "$DIST_FILEPATH.sha512"
+          export DIST_FILEPATH_PREFIX="/tmp/${DIST_FILENAME_VERSIONED_PREFIX}"
+          export DIST_FILEPATH_SRC="${DIST_FILEPATH_PREFIX}-src.zip"
+          export DIST_FILEPATH_BIN="${DIST_FILEPATH_PREFIX}-bin.zip"
+          mv "target/src.zip" "$DIST_FILEPATH_SRC"
+          mv "target/bin.zip" "$DIST_FILEPATH_BIN"
+          for DIST_FILEPATH in "$DIST_FILEPATH_SRC" "$DIST_FILEPATH_BIN"; do
+            gpg --armor --detach-sign --yes --pinentry-mode error "$DIST_FILEPATH"
+            sha512sum "$DIST_FILEPATH" > "$DIST_FILEPATH.sha512"
+          done
           cat >> $GITHUB_ENV << EOF
           DIST_FILENAME_PREFIX=$DIST_FILENAME_PREFIX
           DIST_FILENAME_VERSIONED_PREFIX=$DIST_FILENAME_VERSIONED_PREFIX
-          DIST_FILEPATH=$DIST_FILEPATH
+          DIST_FILEPATH_PREFIX=$DIST_FILEPATH_PREFIX
           EOF
 
       - name: Upload to Subversion
@@ -147,7 +152,7 @@ jobs:
           done
 
           # Copy the distribution
-          cp "$DIST_FILEPATH"* .
+          cp "$DIST_FILEPATH_PREFIX"* .
 
           # Add & commit changes
           svn add "$DIST_FILENAME_PREFIX"*
diff --git a/pom.xml b/pom.xml
index c0c1042..1ff41eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -646,18 +646,22 @@
                     pathByFile.put(repoCacheEntryPath, new File(repoDirectoryParent, repoCacheEntryPath).toPath());
                 }
 
-                // Create `src.zip` using Git-tracked files
+                // Create the source distribution using Git-tracked files
                 zip("target/src.zip", pathByFile);
-                System.out.format("Generated source ZIP containing %d files.%n", new Object[]{pathByFile.size()});
+                System.out.format("Generated the source distribution (`src.zip`) containing %d files.%n", new Object[]{pathByFile.size()});
 
-                // Find auxiliary files that will go into the distribution
+                // Short-circuit if there is no binary distribution expected
+                if (${attachmentCount} == 0) {
+                    return;
+                }
+
+                // Find auxiliary files that will go into the binary distribution
                 SortedMap pathByFile = new TreeMap();
-                pathByFile.put("src.zip", new File("target/src.zip").toPath());
                 pathByFile.put("RELEASE-NOTES.md", new File("target/release-notes/${project.version}.md").toPath());
                 pathByFile.put("NOTICE.txt", new File("NOTICE.txt").toPath());
                 pathByFile.put("LICENSE.txt", new File("LICENSE.txt").toPath());
 
-                // Find attachments that will go into the distribution
+                // Find attachments that will go into the binary distribution
                 String attachmentFilepathPattern = "${attachmentFilepathPattern}";
                 System.out.format("Locating attachments matching the provided pattern: `%s`%n", new Object[] {attachmentFilepathPattern});
                 SortedMap attachmentPathByFile = new TreeMap();
@@ -667,7 +671,7 @@
                         public void accept(Path path) {
                             if (Files.isRegularFile(path, /* required for BSH method resolution: */ new LinkOption[0]) &&
                                     path.toAbsolutePath().toString().matches(attachmentFilepathPattern)) {
-                                attachmentPathByFile.put(path.toFileName().toString(), path);
+                                attachmentPathByFile.put(path.getFileName().toString(), path);
                             }
                         }
                     });
@@ -695,10 +699,10 @@
                     System.exit(1);
                 }
 
-                // Create the distribution ZIP
+                // Create the binary distribution
                 pathByFile.putAll(attachmentPathByFile);
-                zip("target/dist.zip", pathByFile);
-                System.out.format("Generated distribution ZIP containing following %d files:%n", new Object[] {pathByFile.size()});
+                zip("target/bin.zip", pathByFile);
+                System.out.format("Generated the binary distribution (`bin.zip`) containing following %d files:%n", new Object[] {pathByFile.size()});
                 for (String file : pathByFile.keySet()) {
                     System.out.println("-> " + file);
                 }]]></script>


[logging-parent] 01/02: Improve SVN path in `generate-emails.sh`

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

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

commit 6d0c5236f28424aeb89d4612e5d34d281d858750
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Wed Sep 6 09:34:24 2023 +0200

    Improve SVN path in `generate-emails.sh`
---
 .github/generate-email.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/generate-email.sh b/.github/generate-email.sh
index 824bd98..b71b397 100755
--- a/.github/generate-email.sh
+++ b/.github/generate-email.sh
@@ -34,6 +34,7 @@ fail_for_invalid_args() {
 # Constants
 PROJECT_NAME="Apache Logging Parent"
 PROJECT_REPO="https://github.com/apache/logging-parent"
+PROJECT_DIST_DIR="https://dist.apache.org/repos/dist/dev/logging/logging-parent"
 PROJECT_VERSION="$2"
 COMMIT_ID="$3"
 
@@ -59,7 +60,7 @@ This is a vote to release the $PROJECT_NAME $PROJECT_VERSION.
 
 Source repository: $PROJECT_REPO
 Commit: $COMMIT_ID
-Distribution: https://dist.apache.org/repos/dist/dev/logging
+Distribution: $PROJECT_DIST_DIR
 Nexus: https://repository.apache.org/content/repositories/orgapachelogging-1113
 Signing key: 0x077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0