-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Currently doing a release requires manually modifying the __version__ string in the pip/__init__.py file to change it from a pre-release to a final release. Then after the release is done it requires modifying the same file to bump the release to a pre-release of the next release. In addition it requires some foresight into what the next release is even going to be. It would be useful if this information was determined automatically.
The best system I've seen for this currently is developed by @lifeless @rbtcollins for openstack/pbr. Essentially it relies on marking what kind of changes are being made inside of a git commit and then it dynamically computes what the next version should be based on that. In addition when running from a git checkout/clone it automatically calls it a pre-release, but when creating an sdist/wheel it bakes in what the version is based off of the tags in the repository. This means that you don't need to change any code to create a new release, you just run git tag -s X.Y.Z.
On the downside, this system requires pbr to be ran even when you're running from a sdist. However I think the same sort of thing can be done in a way so that when running from a sdist (or a Wheel) you don't need anything special, but when running from a git checkout it automatically gives you the tool that dynamically generates the version string.