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 Distributions
Hashes for python-semantic-release-3.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e7d281cd4bb749c289beb262cb534a0bf2adfb813bb37e504038980c70d2694 |
|
MD5 | 052278a073610883f557ce4a7c33bba2 |
|
BLAKE2b-256 | 019cdedfc88669dd84092b3077c44a0aeadc45f93e58ab28ef26c6523ce4c3e5 |
Hashes for python_semantic_release-3.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bb6515289abe5cd617c52d33a8dcc3c24d854d59873a76da6ba16664e9efa81 |
|
MD5 | 045bf430736114e08cf1495c777d1207 |
|
BLAKE2b-256 | a5d525f73be5d0140bc0ee99a96dc7157d3126ece93880bc892f7ce1c9fcbef7 |
Hashes for python_semantic_release-3.3.1-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37923cd70953facf205c2d49771f66a0b4d813e9737bc6b82f96b8b53af27b17 |
|
MD5 | 6e649c1a9b20941da6f66e2f9bdfa8c8 |
|
BLAKE2b-256 | fda41a44dd657a901d5067ac38c8a7696b86ab17ffe16c16a0e3663097095b70 |