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. --retry Retry the same release, do not bump. --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.
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.11.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5ff13bd9dea1a3051c9352aa8b1274e803184d839732ae4f3e332408979518d |
|
MD5 | 68f962bf0273f46dc6730632d5e3bb12 |
|
BLAKE2b-256 | a87ec3e1c2ca2218814c038b1c37a2878f92d577cd1fc435e03ff75e9cc657ed |
Hashes for python_semantic_release-3.11.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a81283e38aabc2ac6fd8336d51f07fb3a5752304fdfc9c2570d0bd58cc2d252c |
|
MD5 | 8c8312a6c7bc70d0eba7efbfde8d341a |
|
BLAKE2b-256 | 35a39047350e7414c22b7a88b31c1982cb37fb7d288bdfe7dba2a4dc2eca13b8 |
Hashes for python_semantic_release-3.11.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 939a22f680d9d629089969dc030e790ec6a23dbfd1fe6a7213256df25895e3e9 |
|
MD5 | fa38f5b7e755eedefac3bc3424f19882 |
|
BLAKE2b-256 | de0815b075c0564df24b324923c295860800384481c85934077187167af49297 |