-
Notifications
You must be signed in to change notification settings - Fork 15
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
Decouple search & replace from version bump #19
Comments
Digging into past forks, I found related issues:
|
@kdeldycke I need help understanding your 3 steps. I'm sure I'm missing something.
|
Before performing step 1#, I have links pointing to the And there is dozen links of that kind, pointing to binary build, documentation, milestones, GitHub release, ... All must be frozen to the version I'm going to tag and push in step 2#. That is the role of step 1# and the release preparation. Then, in step 3#, I need to revert back these frozen URLs to have them point back to the development branch. For my changelog it would be In my most complex project, it would look like this:
|
I mentioned these 2 issues because the 2 concepts are quite intertwined. In the first link peritus/bumpversion#205, the user is introducing an artificial The problem is he cannot bend the version part definition in It seems the version part bump is tightly coupled with the search and replace set, so it is hard to implement this workaround. Hence my link to peritus/bumpversion#38, which seems to indicate the original author of |
Does this encapsulate your use case:
If so, and considering issue #15, I'm considering dividing bump-my-version into subcommands to make using the features easier. What are your thoughts on this? |
Hmm... Let me check. Yes. That would perfectly work. That's an excellent idea! 😍 Decoupling the two actions would cover for my use-case but also those hinted at elsewhere in tickets from past projects. I'm pretty sure there are a lot of details to think of but even a first rough implementation would give a lot of flexibility to other users. Now I don't know how hard it would be to implement, and how it would fit current bump-my-version internals. But I'm ready to beta-test the feature and provide feedbacks. |
@kdeldycke Take a #30 to see if it works for you. I still need to add tests, but I hoped you could help me with that by finding any edge cases. |
Thanks @coordt for the 0.7.0 release! I'll try that out and report issues as I encounter them! |
0.5.0
3.11.4
Description
I'd like to discuss a use-case about my release workflow for Python packages.
The essential steps boils down to:
bump-my-version
's business)bump-my-version patch
I'm looking for a clean way to implement step #1 with
bump-my-version
.I currently I have a chain of
find
,sed
andperl
CLIs to essentially perform a search and replace. BTW, that's where I need to fetch the current version, as discussed in #15.Ideally, I would like to have a
bump-my-version prepare-release
shortcut, that would invoke a custom set of search/replace patterns under a customprepare-release
ID. That would be an addition to the defaultmajor
/minor
/patch
subcommands.I'm pretty sure
bump-my-version
doesn't support that use case. So I choose to call that featuresearch & replace without version bump
orsearch & replace sub-group
in this issue title. Feel free to change it if it makes more sense.What I Did
Before
bump-my-version
, I used to rely on a quirk frombump2version
. Which consisted in performing an adhoc search and replace using the CLI:This would update the strings in my
./.github/workflows/tests.yaml
file without bumping the internal version number.Note how I used the
no-bump
version part, which doesn't exist anywhere in my configuration. That is the quirk I relied on, becausebump2version
was silently ignoring that random string.Of course the exact same pattern doesn't work with
bump-my-version
:The text was updated successfully, but these errors were encountered: