Skip to content

Commit

Permalink
fix bum-version regex for changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed Nov 13, 2024
1 parent ba7363b commit c070d91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,15 @@ replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "^## Unreleased$"
replace = "## [v{new_version}] {now:%Y-%m-%d}"
regex = true
search = "^## \\[Unreleased\\]"
replace = "## [Unreleased]\n\n## [v{new_version}] - {now:%Y-%m-%d}"

[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
regex = true
search = "\\[Unreleased\\]: (https://.+?)v{current_version}\\.\\.\\.HEAD"
replace = "[Unreleased]: \\1v{new_version}...HEAD\n[{new_version}]: \\1v{current_version}...v{new_version}"

[[tool.bumpversion.files]]
filename = "CITATION.cff"
Expand Down

0 comments on commit c070d91

Please sign in to comment.