m-vdb / pep440-version-utils

Utilities to deal with pep440 versioning
MIT License
7 stars 5 forks source link

Feature/handle dev versions #1

Open corriander opened 4 years ago

corriander commented 4 years ago

Well, this is nice! I was about to write something to increment versions automagically and I stumbled on this.

Sadly my use-case* requires dev versions and release versions only (perhaps with a release candidate option somewhere down the line) and I decided to have a stab at folding the functionality in rather than reinvent this particular wheel. Let's say I now intuitively understand both a) why you haven't implemented this yet and b) PEP440 discourages various types of dev and post releases...

That said, I've given it a shot.

Anyway, hope this is useful. I'll try not to submit and run but I'm fairly snowed under at the moment so please bear with me :)

*I'll explain my use case a little more because it might help: I stumbled on versioneer and that handles "what is the current version?" fantastically. I was looking for something in a CI Azure Pipeline that would take a version with a local segment and, under certain conditions, increment to a dev version. These changes now achieve that.

m-vdb commented 2 years ago

hey @corriander ! sincere apologies for not seeing your pull request earlier. Thanks a lot for the detailed write-up! I'm curious if you actually used the changes in your PR to solve your use case. If so, did it work like expected in your workflow?