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 belongs in semantic_release section of the setup.cfg file in your project. Details about configuration options can be found in the configuration documentation.
Found a bug
Please create a pull-request with a test case that shows the usage. If you are unsure were to put it, just create a new file inside tests, and we will point you in the right direction.
Have a feature request
Check the trello board and roadmap.md to see if it is already in the pipeline. If not make a pull-request to roadmap.md.
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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd06472df0af0734860805238ab45b1f2bdcacec79e92166fcd4a948a4193bc |
|
MD5 | 14f050c426210b37499fd780701f95fe |
|
BLAKE2b-256 | a251588eec324fb66e2e5cda5798fa78904159cfb0094199d8aa16541d27d062 |
Hashes for python_semantic_release-3.9.0-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef640f4b78d29ae0b2aa29bf8f791109a4cb52741a251800330bc16400ab6f57 |
|
MD5 | ad958a89a3a169d75638ce188a239036 |
|
BLAKE2b-256 | daa7e06894cbd8d85d35d0400892ee35023ce26e775b944e54d776b7b1bdc2ab |
Hashes for python_semantic_release-3.9.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6283f52fcec92caf24d53758d0dbaa4790faa6824d56bff98a1d31f7ab38875 |
|
MD5 | 449a26c635ae7eeeaea73fd6c392c82f |
|
BLAKE2b-256 | 62f5a75a51086e782cb31d81a97d7f977277cdbb5dccd67c33324fe1eea2ce8f |
Hashes for python_semantic_release-3.9.0-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740bcfc87313c7580fe2df9e6ceb71427d0971cd75d517d041d4f5b56a276b33 |
|
MD5 | 7bc92ac015051a30412b7d6eb7857bc5 |
|
BLAKE2b-256 | abd3a55e010ad87d2164e373647389faaef49f5203e9f1d743d1422d4a403d13 |