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 0ed43aa Use the last commit date for setting
`project.build.outputTimestamp`
0ed43aa is described below
commit 0ed43aa9db75380e8c81c062b9546af077745aa8
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Mon Nov 6 10:31:38 2023 +0100
Use the last commit date for setting `project.build.outputTimestamp`
This approach is deterministic compared to calling `date` each time.
---
.github/workflows/deploy-release-reusable.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/deploy-release-reusable.yaml
b/.github/workflows/deploy-release-reusable.yaml
index 013310a..27acd75 100644
--- a/.github/workflows/deploy-release-reusable.yaml
+++ b/.github/workflows/deploy-release-reusable.yaml
@@ -122,7 +122,7 @@ jobs:
shell: bash
run: |
export PROPERTY="project.build.outputTimestamp"
- export TIMESTAMP=$(date --utc "+%Y-%m-%dT%H:%M:%SZ")
+ export TIMESTAMP=$(TZ=UTC0 git show --quiet
--date="format-local:%Y-%m-%dT%H:%M:%SZ" --format="%cd")
sed -r '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'