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] [![Coverage status][coverage-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://ci.frigg.io/relekang/python-semantic-release/last/
[build-badge]: https://ci.frigg.io/relekang/python-semantic-release.svg
[coverage-badge]: https://ci.frigg.io/relekang/python-semantic-release/coverage.svg
[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] [![Coverage status][coverage-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://ci.frigg.io/relekang/python-semantic-release/last/
[build-badge]: https://ci.frigg.io/relekang/python-semantic-release.svg
[coverage-badge]: https://ci.frigg.io/relekang/python-semantic-release/coverage.svg
[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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2874023c952b52887bdc1a33d047c4cba3263073f4ddc9bf8b4ff9379c9820e2 |
|
MD5 | 49a724573e643aaac7b6af937dd98eec |
|
BLAKE2b-256 | 667c99cb597a79bb387680545296304e300ea5ae7d805418cb00ae9cb038470d |
Close
Hashes for python_semantic_release-3.3.0-py3.5.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88fce3046d64b61b134ffeb1ff92d7e353099b28aa2aa64a8ca7b927cd797048 |
|
MD5 | 1b0c37b76fc498eae347a780fdaaa4e0 |
|
BLAKE2b-256 | f05f072979e535399dea342b238f5660e17ad1d9f68880ec6c35328ca2ddd6af |
Close
Hashes for python_semantic_release-3.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 679a8a245abccf2661bd23410f644cea2d45f60287faf0b9b9d78ab143dcbbeb |
|
MD5 | 361eb7346a8a8a4cd1e81fe5e5a542d6 |
|
BLAKE2b-256 | edde28b8fe2cd27730374839f1700324b0430e2d6f98c7f9652dc57253233025 |
Close
Hashes for python_semantic_release-3.3.0-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e28cbebc92783203ecd2b89f320697bbb0437d7fc1026149a9175164499a4a |
|
MD5 | bea400b5e9c5d5259788dbde31694493 |
|
BLAKE2b-256 | e25e71fbac044f4d56f53035013a52ba4af41bbe149111d581eabf8bee48ea51 |