-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: conditional search
and replace
blocks
#189
Comments
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. |
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 #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! |
Tested, seems to be working! I only used the |
Can confirm that it works for |
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.:The text was updated successfully, but these errors were encountered: