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/11/13 08:53:02 UTC

(logging-parent) branch main updated: Fail release on missing `project.build.outputTimestamp` property

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 856cb1a  Fail release on missing `project.build.outputTimestamp` property
856cb1a is described below

commit 856cb1a71e30eebc38b7610ee3e4f9a82690eda8
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Mon Nov 13 09:53:16 2023 +0100

    Fail release on missing `project.build.outputTimestamp` property
---
 .github/workflows/deploy-release-reusable.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/deploy-release-reusable.yaml b/.github/workflows/deploy-release-reusable.yaml
index 27acd75..612e040 100644
--- a/.github/workflows/deploy-release-reusable.yaml
+++ b/.github/workflows/deploy-release-reusable.yaml
@@ -122,10 +122,14 @@ jobs:
         shell: bash
         run: |
           export PROPERTY="project.build.outputTimestamp"
+          grep -q '^([\t ]+<'$PROPERTY'>' pom.xml || {
+            echo "Failed to find the \`$PROPERTY\` Maven property!"
+            exit 1
+          }
           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'
+            git commit -S pom.xml -m "Update the \`$PROPERTY\` property"
             git push -f origin
           fi