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


The following commit(s) were added to refs/heads/main by this push:
     new d610044  Fix YAML escaping issue, 3rd time
d610044 is described below

commit d61004484a98145ea698f3c936475313927d3404
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Mon Sep 4 12:33:32 2023 +0200

    Fix YAML escaping issue, 3rd time
---
 .github/workflows/deploy-release-reusable.yml | 3 ++-
 pom.xml                                       | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/deploy-release-reusable.yml 
b/.github/workflows/deploy-release-reusable.yml
index eca16b0..eca60d7 100644
--- a/.github/workflows/deploy-release-reusable.yml
+++ b/.github/workflows/deploy-release-reusable.yml
@@ -31,7 +31,8 @@ on:
       # `distribution-*` input defaults should match the ones in `pom.xml`!
       distribution-attachment-filepath-pattern:
         description: The regex pattern matched against the full filepath for 
determining attachments to be included in the distribution
-        default: ^.*/target/log4j-(.+)-${{ '$' 
}}{project.version}(-tests)?\\.jar${{ '$' }}
+        # Below `\$` are placed to avoid `bad substitution` failures in CI
+        default: ^.*/target/log4j-(.+)-\${project.version}(-tests)?\\.jar\$
         type: string
       distribution-attachment-count:
         description: The number of attachments expected to be found
diff --git a/pom.xml b/pom.xml
index 92664cf..e9b9a56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -640,13 +640,15 @@
                 pathByFile.put("LICENSE.txt", new 
File("LICENSE.txt").toPath());
 
                 // Find attachments that will go into the distribution
+                String attachmentFilepathPattern = 
"${attachmentFilepathPattern}";
+                System.out.format("Locating attachments matching the provided 
pattern: `%s`%n", new Object[] {attachmentFilepathPattern});
                 SortedMap attachmentPathByFile = new TreeMap();
                 Stream paths = Files.walk(new 
File(repoDirectoryParent).toPath(), 8, /* required for BSH method resolution: 
*/ new FileVisitOption[0]);
                 try {
                     paths.forEach(new Consumer() {
                         public void accept(Path path) {
                             if (Files.isRegularFile(path, /* required for BSH 
method resolution: */ new LinkOption[0]) &&
-                                    
path.toAbsolutePath().toString().matches("${attachmentFilepathPattern}")) {
+                                    
path.toAbsolutePath().toString().matches(attachmentFilepathPattern)) {
                                 
attachmentPathByFile.put(path.toFileName().toString(), path);
                             }
                         }

Reply via email to