This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch release/0.1.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git


The following commit(s) were added to refs/heads/release/0.1.0 by this push:
     new b0df367  Fix release version check
b0df367 is described below

commit b0df367c71f7cc18b5f1e16848dfd87f620edd4d
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Mon May 1 19:47:53 2023 +0200

    Fix release version check
---
 .github/workflows/build.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6459af9..e382ca9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -159,15 +159,15 @@ jobs:
             echo "was expecting a release version, found: 
\"$PROJECT_VERSION\"" 1>&2
             exit 1
           }
-          export CHANGELOG_VERSION=$(grep "^== " CHANGELOG.adoc | head -n 1 | 
sed -r 's/^== (.+) \(.+\)$/\1/')
+          export CHANGELOG_VERSION=$(grep "^= " CHANGELOG.adoc | head -n 1 | 
sed -r 's/^== (.+) \(.+\)$/\1/')
           [[ "$PROJECT_VERSION" == "$CHANGELOG_VERSION" ]] || {
             echo "version \"$PROJECT_VERSION\" doesn't match the one in 
changelog: \"$CHANGELOG_VERSION\"" 1>&2
             exit 1
           }
-          export CURRENT_DATE=$(date +%Y-%m-%d)
-          export CHANGELOG_DATE=$(grep "^== " CHANGELOG.adoc | head -n 1 | sed 
-r 's/^== .+ \((.+)\)$/\1/')
+          export EXPECTED_DATE=$(date --date="now + 3 days" +%Y-%m-%d)
+          export CHANGELOG_DATE=$(grep "^= " CHANGELOG.adoc | head -n 1 | sed 
-r 's/^== .+ \((.+)\)$/\1/')
           [[ "$CURRENT_DATE" == "$CHANGELOG_DATE" ]] || {
-            echo "current date \"$CURRENT_DATE\" doesn't match the one in the 
changelog: \"$CHANGELOG_DATE\"" 1>&2
+            echo "expected release date \"$CURRENT_DATE\" doesn't match the 
one in the changelog: \"$CHANGELOG_DATE\"" 1>&2
             exit 1
           }
 

Reply via email to