bump2version icon indicating copy to clipboard operation
bump2version copied to clipboard

[API] Possible default replace?

Open henryiii opened this issue 5 years ago • 1 comments

The current search always requires a replace if non-standard:

search = stuff{current_version}stuff
replace = stuff{new_version}stuff

If you don't always define replace (to exactly the same thing as search except with {current_version} replaced by {new_version}, then you can't run bump version more than once. Couldn't the default for replace instead be search except with {current_version} replaced by {new_version}? Then it would almost never need to be specified.

Just a thought, sorry if it's come up before!

henryiii avatar Aug 26 '20 22:08 henryiii

This looks very appealing to me.

90% of search should not need a custom replace in this way.

The other 10% is when you want to include dynamic things in the replace like environment variables or dates.

florisla avatar Jan 14 '21 21:01 florisla