Library and command line app to manage project releases or versions
Releaseme should ease the process of versioning a product and increment its version when required, despite the version is managed as a file or a repository tag.
Two options: to install it in your system/project:
pip install releaseme
And you can use it with:
python -m releaseme -h
Or just download the lastest zip and use it with:
python releaseme-X.Y.Z.zip -h
Let’s see an example. We have git project with a file in project/__init__.py:
__version__ = '2.3.4'
We want to manage versions with releaseme. And just a command is required:
$ python -m releaseme.__main__ --git --file project/__init__.py
This can seem a bit confusing at the beginning, but it is easy to explain: The git tag should mark the point where that version was launched, but the file should change to indicate the version we are working on.
This way, the file will always contain the next version to be used and the git tag, the point when it was released.
Yes. Just edit the file with version and put the desired one.
The higher one will be used.
Not a problem, because you can use:
$ python -m releaseme.__main__ --file project/__init__.py setup.py
and it will set the same version for all of them.
Releaseme format is:
[-h] [-v] [--git] [--mercurial] [--file [FILE [FILE ...]]] [ACTION]
Where Action is any of
increment. If none is provided,
increment will be used:
getshows current version after processing all files.
incrementwill read the version and increment it in all files.
If you are using a Git repository, this will use git tags to get/set the version. No more arguments are required.
If you are using a Mercurial repository, this will use mercurial tags to get/set the version. No more arguments are required.
Allows you to select one or several files (space separated) to manage the version.
Versions are up to 4 numbers separated by points. In addition, it can contain a hyphon (‘-‘) and an alphanumeric string at the end. So, valid version numbers are:
Version numbers that will not be managed correctly include:
If more than one number is retrieved, the higher one will be used. So:
Finally, only the minor number will be incremented:
The best way to use it is launching it just after releasing. So, the best way to do it is to add the releaseme call to your publishing script.
Because I still didn’t require it. Please, feel free to add an issue and/or send a pull-request.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|releaseme-0.2.8-py2-none-any.whl (9.0 kB) Copy SHA256 Checksum SHA256||2.7||Wheel||Oct 17, 2014|
|releaseme-0.2.8.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256||–||Source||Oct 17, 2014|
|releaseme-0.2.8.zip (11.6 kB) Copy SHA256 Checksum SHA256||–||Source||Oct 17, 2014|