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/01/09 19:49:35 UTC
[logging-log4j-tools] branch master updated (6c3273d -> d10ada0)
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 6c3273d INFRA-24051 Set Nexus credentials for releases
new 0319ee3 Fix git tagging in release script
new 42ad72d Skip empty directories in exporter
new d10ada0 Update release date in CHANGELOG
The 3 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 | 2 +-
CHANGELOG.adoc | 2 +-
.../changelog/exporter/ChangelogExporter.java | 33 ++++++++++++++--------
3 files changed, 23 insertions(+), 14 deletions(-)
[logging-log4j-tools] 03/03: Update release date in CHANGELOG
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 d10ada06959ddcec9104191c75cd36abc4494a28
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:22:33 2023 +0100
Update release date in CHANGELOG
---
CHANGELOG.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index d9a0684..d0a23a4 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -15,6 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
////
-== 0.1.0 (2023-01-04)
+== 0.1.0 (2023-01-09)
* Added `log4j-tools-bom` and `log4j-changelog` modules (for https://issues.apache.org/jira/browse/LOG4J2-3628[LOG4J2-3628] by `vy`)
[logging-log4j-tools] 01/03: Fix git tagging in release script
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 0319ee387a9b3b7485519fae0c70d226408f2bdd
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:49:33 2023 +0100
Fix git tagging in release script
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7cf1d42..ba8228a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -207,5 +207,5 @@ jobs:
export TAG="v$PROJECT_VERSION"
git config user.name github-actions
git config user.email github-actions@github.com
- git tag --sign "$TAG"
+ git tag "$TAG"
git push origin "$TAG"
[logging-log4j-tools] 02/03: Skip empty directories in exporter
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 42ad72d1335834b1b066ea695ad05c9ab51f30bc
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Jan 9 20:31:15 2023 +0100
Skip empty directories in exporter
---
.../changelog/exporter/ChangelogExporter.java | 33 ++++++++++++++--------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
index 1ea18de..236dcea 100644
--- a/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
+++ b/log4j-changelog/src/main/java/org/apache/logging/log4j/changelog/exporter/ChangelogExporter.java
@@ -18,6 +18,7 @@ package org.apache.logging.log4j.changelog.exporter;
import java.io.IOException;
import java.io.UncheckedIOException;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
@@ -38,18 +39,7 @@ public final class ChangelogExporter {
final ChangelogExporterArgs args = ChangelogExporterArgs.fromSystemProperties();
// Find release directories
- final List<Path> releaseDirectories = FileUtils
- .findAdjacentFiles(
- args.changelogDirectory, true,
- paths -> paths
- .filter(file -> file.toFile().isDirectory())
- .sorted(Comparator.comparing(releaseDirectory -> {
- final Path releaseXmlFile = ChangelogFiles.releaseXmlFile(releaseDirectory);
- final ChangelogRelease changelogRelease =
- ChangelogRelease.readFromXmlFile(releaseXmlFile);
- return changelogRelease.date;
- }))
- .collect(Collectors.toList()));
+ final List<Path> releaseDirectories = findReleaseDirectories(args);
final int releaseDirectoryCount = releaseDirectories.size();
// Read the release information files
@@ -120,6 +110,25 @@ public final class ChangelogExporter {
}
+ private static List<Path> findReleaseDirectories(ChangelogExporterArgs args) {
+ return FileUtils.findAdjacentFiles(
+ args.changelogDirectory, true,
+ paths -> paths
+ .filter(ChangelogExporter::isNonEmptyDirectory)
+ .sorted(Comparator.comparing(releaseDirectory -> {
+ final Path releaseXmlFile = ChangelogFiles.releaseXmlFile(releaseDirectory);
+ final ChangelogRelease changelogRelease =
+ ChangelogRelease.readFromXmlFile(releaseXmlFile);
+ return changelogRelease.date;
+ }))
+ .collect(Collectors.toList()));
+ }
+
+ private static boolean isNonEmptyDirectory(final Path path) {
+ return Files.isDirectory(path) &&
+ FileUtils.findAdjacentFiles(path, false, paths -> paths.findFirst().isPresent());
+ }
+
private static void exportRelease(
final Path outputDirectory,
final Path releaseDirectory,