bump2version icon indicating copy to clipboard operation
bump2version copied to clipboard

`part` should not be required if supplying `--new-version`

Open brettswift opened this issue 6 years ago • 8 comments

This one is pretty basic, but I must be missing something in how people are using this.

Part shouldn't be a required field if you're supplying --new-version. It doesn't make any sense.

If I'm at 0.1.0, and I want to go to 0.1.1, I should be able to do: bumpversion --new-version 0.1.1. I know I can just do bumpversion minor but in this scenario the version is being driven by CI so it may not be sequential.

Anyways, seems like a bug. But this project is old enough that I probably just took some crazy pills. :)

You be the judge!

brettswift avatar Jul 10 '18 13:07 brettswift

I think you're right that this is an odd workflow. A patch would be welcome.

ekohl avatar Aug 01 '18 14:08 ekohl

Until that is implemented/fixed specifying any part does work. $ bump2version lolwat --new-version=0.1.1

Bonus: a nice place to hide meme eastereggs in your CI flow.

luckydonald avatar Aug 09 '18 15:08 luckydonald

Now that the #68 cleanup is merged (thanks!), I'd like to revisit #57 (the --show argument).

But first I'd like to make part optional. This is already demonstrated in PR #51, but I'd like to combine it with a new approach as described in #63.

The idea: support a named --part argument which will allow for more flexibility in the future.

florisla avatar Sep 04 '19 19:09 florisla

Basically it could look into the config file first which names for parts are there, and after that add arguments to the parser dynamically.

luckydonald avatar Sep 04 '19 20:09 luckydonald

Oh, you mean supporting --major, --minor and --my_part arguments?

I was thinkig to call it --part (literally) which does not require dynamic arguments.

florisla avatar Sep 08 '19 16:09 florisla

I don't see a problem in programming that, really. Also less redundancy when typing it out. bump2version --major=2 --minor=0 --my_part=lol would be easier to type and read then bump2version --part major=2 --part minor=0 --part my_part=lol

luckydonald avatar Sep 08 '19 22:09 luckydonald

That would break for people who have a part called commit, tag or message...

These terms are already taken by existing bump2version arguments.

florisla avatar Dec 12 '19 09:12 florisla

To me too (as a random user feedback; the following is only what would be natural to me), when --new-version is used, the new version should be exactly the one provided. No smart heuristics (they break too often). An error when the new version is not compatible with the regex would be fine. But then a --force option (#131) would allow to bypass this check and proceed.

ederag avatar Feb 10 '20 16:02 ederag