zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

bumpversion --feature fails due to string version comparison #299

Closed mctwynne closed 5 years ago

mctwynne commented 5 years ago

When running bumpversion --feature --no-input with a current version of 1.9.1.dev0 I expected to have a successful bump to 1.10.0, however I received the following message instead:

Checking version bump for feature release.
Last tag: 1.9.0
Current version: 1.9.1.dev0
No version bump needed.

This appears to be due to the fact that bumpversion.BumpVersion._grab_version compares versions that are represented as strings.

A little pdb shows the crux of the problem:

(Pdb) minimum_version
'1.10.0'
(Pdb) original_version
'1.9.1.dev0'
(Pdb) minimum_version <= original_version
True
reinout commented 5 years ago

We should probably use the regular version-comparison.

mctwynne commented 5 years ago

@reinout Any rough idea of what the timeline looks like for this one? It seems like a pretty critical issue, no?

reinout commented 5 years ago

Not that critical. Most people only use "fullrelease", not bumpversion. And it only goes wrong on .9 or .19, so all the software that's at 0.1 works just fine :-)

But I'll fix it, probably today. I want to fix #301, so that's always a good time to clear out some other bugs.

reinout commented 5 years ago

The fix itself was small, but getting it to work reliably took quite some doing :-) I'm waiting for @mauritsvanrees' review and then I'll release a new version.

reinout commented 5 years ago

@mctwynne: I've released the fix in 6.15.4 Thanks for reporting the issue and figuring out where the problem was!