c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.05k stars 135 forks source link

Part condition for files #255

Closed rsundqvist closed 1 year ago

rsundqvist commented 1 year ago

Looking at the source I don't think this is possible, but I'll ask anyway. Is it possible to make trigger of search-and-replace conditional on the part being bumped? For example, I would not want a changelog to be updated for dev releases.

Maybe something like:

[bumpversion]
current_version = 0.1.0.dev0
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\.dev(?P<dev>\d+))?)?

[bumpversion:file:CHANGELOG.md]
ignore_parts =
    dev
serialize = {major}.{minor}.{patch}