Automatic semantic versioning for python projects
Project description
# python-semantic-release
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][semantic-release-talk].
[![Build status][build-badge]][last-build] ![PyPI version][pypi-badge]
## 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>`.
```python
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][config-docs].
[last-build]: https://travis-ci.org/relekang/python-semantic-release
[build-badge]: https://travis-ci.org/relekang/python-semantic-release.svg?branch=master
[pypi-badge]: https://badge.fury.io/py/python-semantic-release.svg
[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
[gitter-link]: https://gitter.im/relekang/python-semantic-release?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[semantic-release]: https://github.com/semantic-release/semantic-release
[semantic-release-talk]: https://www.youtube.com/watch?v=tc2UgG5L7WM
[config-docs]: http://python-semantic-release.readthedocs.org/en/latest/configuration.html
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][semantic-release-talk].
[![Build status][build-badge]][last-build] ![PyPI version][pypi-badge]
## 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>`.
```python
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][config-docs].
[last-build]: https://travis-ci.org/relekang/python-semantic-release
[build-badge]: https://travis-ci.org/relekang/python-semantic-release.svg?branch=master
[pypi-badge]: https://badge.fury.io/py/python-semantic-release.svg
[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
[gitter-link]: https://gitter.im/relekang/python-semantic-release?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[semantic-release]: https://github.com/semantic-release/semantic-release
[semantic-release-talk]: https://www.youtube.com/watch?v=tc2UgG5L7WM
[config-docs]: http://python-semantic-release.readthedocs.org/en/latest/configuration.html
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
Close
Hashes for python-semantic-release-3.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f168c473e916f6a0a96f337b8d02043019b776f352b4dd6b1fa82867130627e |
|
MD5 | 88828661923dba525ca3f071a2feec49 |
|
BLAKE2b-256 | 56c5b4fab72975df614653542fae49206ace196355bae4bb3703c5e5f3e61d6f |
Close
Hashes for python_semantic_release-3.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98801dfaf14495bf55ba2a9aa7f168697fb8960215d2f15495932a357232e6e6 |
|
MD5 | a40a479f53ae03057246d3dee8bcad69 |
|
BLAKE2b-256 | 1acffccac709f965a62da0f796326c1f6d270f092909ed6e65c256c50d94eb3c |
Close
Hashes for python_semantic_release-3.4.0-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29fa2987a2d4bd4ae293a4cc91845a0cede6c94f232989a916de5a35fa608ade |
|
MD5 | a22260f663da816aad4ec9b4d7eec12b |
|
BLAKE2b-256 | e5e7c37b75b4117cf2c13c4b0c68d528c2f9bbf4d55c591ecc23a0c7ba5d596a |