Skip to content

Commit

Permalink
fix update-changelog profile
Browse files Browse the repository at this point in the history
  • Loading branch information
sephiroth-j committed Dec 8, 2024
1 parent b192caf commit 564aa76
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,24 @@
</tstamp>
<echo level="info" message="Update CHANGELOG with version: v${project.version} - ${build.date}" />
<replace file="CHANGELOG.md" encoding="${project.build.sourceEncoding}" summary="true">
<replacetoken>[Unreleased]</replacetoken>
<replacevalue><![CDATA[Unreleased
<replacetoken>## Unreleased</replacetoken>
<replacevalue><![CDATA[## Unreleased
### ⚠ Breaking
### ⭐ New Features
### 🐞 Bugs Fixed
## v${project.version} - @build.date@]]></replacevalue>
</replace>
<!-- extra step is required because ${build.date} is not evaluated in previous replacevalue-element -->
<replace file="CHANGELOG.md" encoding="${project.build.sourceEncoding}" token="@build.date@" value="${build.date}" />
<replace file="CHANGELOG.md" encoding="${project.build.sourceEncoding}" token="@build.date@" value="${build.date}" summary="true" />
<!-- fail if changelog entry is missing -->
<fail message="changelog entry '## v${project.version} - ${build.date}' not found!">
<condition>
<not>
<resourcecontains resource="CHANGELOG.md" substring="## v${project.version} - ${build.date}" />
</not>
</condition>
</fail>
</target>
</configuration>
</execution>
Expand Down

0 comments on commit 564aa76

Please sign in to comment.