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/10/26 08:38:48 UTC
[logging-parent] branch release/10.3.0 updated: Replace `project.build.outputTimestamp` in CI (#50)
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/10.3.0
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/release/10.3.0 by this push:
new 2658a6d Replace `project.build.outputTimestamp` in CI (#50)
2658a6d is described below
commit 2658a6d9f81b43bf2eb5ff10a06d9ed31513e67e
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 26 10:35:52 2023 +0200
Replace `project.build.outputTimestamp` in CI (#50)
(cherry picked from commit 87266dab6f66cc761bdb6f0a710c84c49826f241)
---
.github/workflows/deploy-release-reusable.yaml | 22 ++++++++++++++++++----
pom.xml | 10 +++++++++-
.../.10.x.x/add-pom-xml-timestamp-substitution.xml | 8 ++++++++
src/site/_release-notes/_10.x.x.adoc | 16 ++++++++++++++++
4 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/deploy-release-reusable.yaml b/.github/workflows/deploy-release-reusable.yaml
index b378992..a1e0fdf 100644
--- a/.github/workflows/deploy-release-reusable.yaml
+++ b/.github/workflows/deploy-release-reusable.yaml
@@ -78,6 +78,13 @@ jobs:
server-password: NEXUS_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
+ - name: Set up Git user
+ shell: bash
+ run: |
+ # Set up user name and email required for `git commit`
+ git config user.name "ASF Logging Services RM"
+ git config user.email private@logging.apache.org
+
- name: Export version
shell: bash
run: |
@@ -107,12 +114,21 @@ jobs:
-DnewVersion="$PROJECT_VERSION" \
-DgenerateBackupPoms=false \
versions:set-property
- git config user.name "ASF Logging Services RM"
- git config user.email private@logging.apache.org
git commit -S pom.xml -m "Set version to \`$PROJECT_VERSION\`"
git push -f origin
fi
+ - name: Set the Maven `project.build.outputTimestamp` property
+ shell: bash
+ run: |
+ export PROPERTY="project.build.outputTimestamp"
+ export TIMESTAMP=$(date --utc "+%Y-%m-%dT%H:%M:%SZ")
+ sed 's|^([\t ]+<'$PROPERTY'>).+(</'$PROPERTY'>)$|\1'$TIMESTAMP'\2|g' -i pom.xml
+ if [ -n "$(git status --porcelain)" ]; then
+ git commit -S pom.xml -m 'Update the `project.build.outputTimestamp` property'
+ git push -f origin
+ fi
+
- name: Release changelog
shell: bash
run: |
@@ -124,8 +140,6 @@ jobs:
process-sources
git add src
if [ -n "$(git status --porcelain)" ]; then
- git config user.name "ASF Logging Services RM"
- git config user.email private@logging.apache.org
git commit -S src -m "Release changelog for version \`$PROJECT_VERSION\`"
git push -f origin
fi
diff --git a/pom.xml b/pom.xml
index 4c2fc6e..f780a78 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,6 +147,15 @@
<!-- project version -->
<revision>10.3.0</revision>
+ <!-- `project.build.outputTimestamp` is required to be present for reproducible builds.
+ We actually inherit one from the `org.apache:apache` parent.
+ Though inheriting this property has two undesired consequences:
+ 1. `artifact:compare` dumps an `ERROR` log stating that this `property should not be inherited but defined` (#50)
+ 2. This value is employed in various places while creating the distribution
+ To mitigate these, we define a *dummy* value here and let the CI replace it during a release.
+ Hence, *DO NOT MANUALLY EDIT THIS VALUE*! -->
+ <project.build.outputTimestamp>2023-10-26T08:29:15Z</project.build.outputTimestamp>
+
<!-- target Java 8 -->
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
@@ -195,7 +204,6 @@
<osgi.annotation.version>8.1.0</osgi.annotation.version>
<osgi.annotation.bundle.version>2.0.0</osgi.annotation.bundle.version>
<osgi.annotation.versioning.version>1.1.2</osgi.annotation.versioning.version>
-
<spotbugs-annotations.version>4.8.0</spotbugs-annotations.version>
<!-- plugin versions -->
diff --git a/src/changelog/.10.x.x/add-pom-xml-timestamp-substitution.xml b/src/changelog/.10.x.x/add-pom-xml-timestamp-substitution.xml
new file mode 100644
index 0000000..b333861
--- /dev/null
+++ b/src/changelog/.10.x.x/add-pom-xml-timestamp-substitution.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
+ type="added">
+ <issue id="50" link="https://github.com/apache/logging-parent/issues/50"/>
+ <description format="asciidoc">Add support to replace `project.build.outputTimestamp` Maven property in CI</description>
+</entry>
diff --git a/src/site/_release-notes/_10.x.x.adoc b/src/site/_release-notes/_10.x.x.adoc
index 8f67449..2e8cb8b 100644
--- a/src/site/_release-notes/_10.x.x.adoc
+++ b/src/site/_release-notes/_10.x.x.adoc
@@ -40,3 +40,19 @@
This minor release contains several small improvements.
+
+==== Added
+
+* Add support to extend the `bnd-maven-plugin` configuration with `bnd-extra-config` property (https://github.com/apache/logging-log4j2/issues/1895[apache/logging-log4j2#1895])
+* Add support to replace `project.build.outputTimestamp` Maven property in CI (https://github.com/apache/logging-parent/issues/50[50])
+
+==== Changed
+
+* `deploy-release-reusable.yaml` is improved to automatically derive deployed artifacts as attachments. This renders both `distribution-attachment-filepath-pattern` and `distribution-attachment-count` input arguments redundant for almost all cases.
+* Convert `bnd-maven-plugin` API leakage warnings to errors (https://github.com/apache/logging-log4j2/issues/1895[apache/logging-log4j2#1895])
+* Update `com.google.errorprone:error_prone_core` to version `2.23.0` (https://github.com/apache/logging-parent/pull/49[49])
+
+==== Fixed
+
+* Fix broken changelog entry validation
+* Attach `flatten:clean` to `clean` phase