Skip to content

Commit

Permalink
Fix CHANGELOG.md check in release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed Feb 4, 2022
1 parent e71cc88 commit c5b8893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ jobs:
echo "was expecting a release version, found: \"$REVISION\"" 1>&2
exit 1
}
export CHANGELOG_VERSION=$(head -n 1 CHANGELOG.md | sed -r 's/^### \(.*\) v(.*)$/\1/')
export CHANGELOG_VERSION=$(grep "^### " CHANGELOG.md | head -n 1 | sed -r 's/^### \(.*\) v(.*)$/\1/')
[[ "$REVISION" == "$CHANGELOG_VERSION" ]] || {
echo "version \"$REVISION\" doesn't match the one in the CHANGELOG: \"$CHANGELOG_VERSION\"" 1>&2
exit 1
}
export CURRENT_DATE=$(date +%Y-%m-%d)
export CHANGELOG_DATE=$(head -n 1 CHANGELOG.md | sed -r 's/^### \((.*)\) v.*$/\1/')
export CHANGELOG_DATE=$(grep "^### " CHANGELOG.md | head -n 1 | sed -r 's/^### \((.*)\) v.*$/\1/')
[[ "$CURRENT_DATE" == "$CHANGELOG_DATE" ]] || {
echo "current date \"$CURRENT_DATE\" doesn't match the one in the CHANGELOG: \"$CHANGELOG_DATE\"" 1>&2
exit 1
Expand Down

0 comments on commit c5b8893

Please sign in to comment.