Closed sharkvan closed 3 years ago
M also on same boat... here is what I get the error
bumpversion.exceptions.VersionNotFoundException: Did not find '__version__: 0.1.6' in file: '_version.py'
ir works fine in v1.0.0
Thanks for the heads up -- will take a look when I have some more time.
I have the same issue with double quotes, I have lots of packages that use this and now its no longer working
I just confirmed, bumpversion is no longer usable due to this error. I recommend that users use
bump2version==1.0.0
There was some breaking change. But it is still usable, just change your .bumpversion.cfg to:
[bumpversion:file:./version.sh]
search = CONF_VERSION='{current_version}'
replace = CONF_VERSION='{new_version}'
In my opinion the previous behavior sounds strange.. maybe it did not find the search-string and then did fall back to the default search/replace?
Yeah I'm with balrok on this one, I also use quotes in my custom search/replace patterns and that works correctly. The previous behaviour was only hiding the fact that the search expression in these examples is incorrect without the quotes, and falling back to the default happened to produce the desired output by coincidence.
This was changed in https://github.com/c4urself/bump2version/pull/128 to fix https://github.com/c4urself/bump2version/issues/127. I believe the current behaviour makes the most sense, a custom replace pattern shouldn't be used on a misconfigured search pattern.
I understand the frustration in updating a dependency and then not having it work as it used to, but I'd still class the change as an intentional bugfix rather than an unintentional breaking change.
Perhaps the best solution here would be to update the documentation with some more examples and a clear instruction for these two scenarios. I'd be happy to submit a PR with some doc changes for Hacktoberfest?
@c4urself, just pushed #172 to update the docs and clarify what the intended behaviour is here. Please let me know if that's sufficient to close this issue.
Hope that helps the users.
This seems to be a breaking change, and semantic version for this patch should be 2.0.0
This is indeed a breaking change, but only for configurations which are broken to begin with.
So one could argue if we really need to 'support' such use.
I'm inclined to not call this 2.0.0
since by now the harm is done. Users upgrading to bump2version 1.0
by now will start with 1.0.1
or higher.
@kyluca I'm working on a nicer structure for usage examples in the documentation. I'll ping you when it's ready to accept more examples.
@kyluca I'm working on a nicer structure for usage examples in the documentation. I'll ping you when it's ready to accept more examples.
Nevermind, I forgot about your PR #172
Closing this since it's now better documented and works fine for correct configuration files.
No worries, thanks! :smile:
I have several applications that use bumpversion. The latest release has caused a breaking change. I have files like the following
.bumpversion.cfg
version.sh
when my build runs
bumpversion minor
it errors because it cannot find the version in the fileversion.sh
I figured out the it is because the value in wrapped in single quotes. This worked fine in version 1.0.0 but is now broken in 1.0.1