Skip to content

Commit

Permalink
docs: Add Replacement Rules for CITATION.cff
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kevinmatthes committed Mar 9, 2023
1 parent 37f8ae2 commit ee8231c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -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]
Expand Down

0 comments on commit ee8231c

Please sign in to comment.