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
Don't fall back to original_version if search
pattern is not found
#127
Comments
+1 |
search
pattern is not foundsearch
pattern is not found
Hey @florisla I am facing the exact same problem for a Until your PR is merged and included in a release is there any other way to go around this? |
Depends on c4urself/bump2version#127 being merged and included in a release. Fix rotki#447
Hi, the problem is that the This fix does not solve that problem! Instead of producing erratic output, it will simply not bump the version number. It looks like one can not use whitespace after a newline in the I'm not familiar with a workaround; if you put the advanced expression in Unless anyone knows a better option, #48 is what you need. |
I see. Thank you for the response @florisla Handling of json files would be absolutely great! Any way I can help pushing that PR? 😄 |
@LefterisJP PR #48 needs to be rebased on master and needs some other impovements. Would be great if you could look into it. |
This is one of the areas where bump2version does not work like I expect it to.
If for any reason (user error) the
search
pattern is not found, it simply assumes that it can replace{current_version}
with the new version.This can lead to incorrect changes (broken files!) as demonstrated in #126. I often encounter this while developing
search
patterns and when using customreplace
patterns.I think this 'fall-back feature' does more harm than good, and we should drop it.
Given a file version.txt
And a config
Doing
bumpversion patch
produces this without any warning:This is wrong!
The text was updated successfully, but these errors were encountered: