Automatic semantic versioning for python projects
Project description
Automatic semantic versioning for python projects. This is an python implementation of the semantic-release for js by Stephan Bönnemann. If you find this topic interesting you should check out his talk from JSConf Budapest.
Install
pip install python-semantic-release
Usage
The general idea is to have some sort of tag in commit messages that indicates certain types of changes. If a commit message lack a tag it is ignored. Running release can be run locally or from a CI service.
Usage: semantic-release [OPTIONS] COMMAND Options: --major Force major version. --minor Force minor version. --patch Force patch version. --noop No-operations mode, finds the new version number without changing it. --post If used with the changelog command, the changelog will be posted to the release api. --help Show this message and exit.
Commands
version - Create a new release. Will change the version, commit it and tag it.
publish - Runs version before pushing to git and uploading to pypi.
changelog - Generates the changelog for the next release.
Running commands from setup.py
Add the following to your setup.py and you will be able to run python setup.py <command> as you would semantic-release <command>.
try:
from semantic_release import setup_hook
setup_hook(sys.argv)
except ImportError:
pass
Configuration
Configuration belong in semantic_release section of the setup.cfg file in your project. Details about configuration options can be found in the configuration documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python-semantic-release-3.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9c8cdabc2f00aa7eb8f2f2af2508ff190b9dcb962bd36531ca6dbdaea1d4a2e |
|
MD5 | 047bc1c0a2ae565f7af855fbd2bff410 |
|
BLAKE2b-256 | 70c9202eca32e242b74a6e84d052ac8bffbae85dbef98e17d377940c31fc9cf3 |
Hashes for python_semantic_release-3.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9685e070a4102ba890c06046514d85adcb77e96e544dbf9bc12c8897dbcdf3ba |
|
MD5 | a3d11c6e4b753293990382a4d2c2e385 |
|
BLAKE2b-256 | 3d822a39b82d137f4103f29b637fac7d2640a2897e27db7cc123178b1e673395 |