docs: Add Replacement Rules for CITATION.cff

The regular expression for the release date update is taken from the
GitHub Action `kevinmatthes/cff-release-today@v0.5.2` which uses this
one, too.  License issues should not arise as I am the author of that
GitHub Action.

The regular expression for the version update is designed to also work
with version parts consisting of multiple digits.  It was tested
successfully with the example versions `1.2.3` and `1.2.30` in
CITATION.cff.
This commit is contained in:
Kevin Matthes 2023-03-09 16:32:49 +01:00
parent 37f8ae20b7
commit ee8231c69f

View file

@ -57,6 +57,8 @@ pre-release-replacements = [
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1},
{file="CITATION.cff", search="^date-released: ....-..-..", replace="date-released: {{date}}"},
{file="CITATION.cff", search="^version: .+\\..+\\..+", replace="version: {{version}}"},
]
[features]