Closed Zeitsperre closed 5 months ago
FYI @bzah
Your approach is interesting. It might be a bit before I can accomplish it.
What I currently do to avoid this problem is not have bump-my-version commit and tag. Then I can package the dev release but the version changes are not saved.
We'd also like to use such a feature, for example in the various replacements for a Quality-time release. Ideally, the changelog itself should only be altered in case of a "final" release and not for release-candidates.
@wkoot @Zeitsperre
I have working code in PR #189 . I'm going to update the docs more. I would love some feedback before I merge this.
I assume you mean https://github.com/callowayproject/bump-my-version/pull/197, is it possible to publish a release candidate or temp version we can easily fetch from pypi? :)
@wkoot @Zeitsperre I have a pre-release available.
@coordt Thanks so much! I'll have time either today or tomorrow to give this a try!
@wkoot @Zeitsperre I have a pre-release available.
Tested, seems to be working! I only used the exclude_bumps
option though
Can confirm that it works for include-bumps
!
Description
I've been running into a problem and was wondering how much of an implementation challenge this would be. In my changelog, I would love to make use of the search and replace functionality for automating the version entries a bit.
An example implementation (from a rendered cookiecutter template):
To break it down, this adds a new entry that for
unreleased
and replaces the olderunreleased
entry with the tagged version. My issue is when I'm usingSemVer v2.0
(https://semver.org/spec/v2.0.0.html) and bumping the development version on every commit, e.g.:This triggers the replacement block on every operation, so I end up with multiple changelog blocks for each progressive non-
release
bump. Not great.What I'd like to happen
I'd love to see an option under the
[[tool.bumpversion.files]]
entries to only do a replacement operation if a specific type ofbump
operation is called (e.g.major
,minor
,patch
, but specificallyrelease
in my case), e.g.: