Skip to main content

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.

Build status PyPI version

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

python-semantic-release-3.5.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

python_semantic_release-3.5.0-py2.py3-none-any.whl (25.4 kB view details)

Uploaded Python 2Python 3

python_semantic_release-3.5.0-py2.7.egg (56.0 kB view details)

Uploaded Egg

File details

Details for the file python-semantic-release-3.5.0.tar.gz.

File metadata

File hashes

Hashes for python-semantic-release-3.5.0.tar.gz
Algorithm Hash digest
SHA256 d7e204b6a3fd605d22fca32323882a289829bcd231a42171d899ba6fae92aad9
MD5 9db76efdcd9738de1a975605e7aa12c8
BLAKE2b-256 471931440a15ab41575685a80a3f5f31af6408d92041f77a2476be737db4e5fc

See more details on using hashes here.

File details

Details for the file python_semantic_release-3.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_semantic_release-3.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 58d39cb04bd2151e095e2643206c044f070069e66c5fac5d56edd3e0bafdafbe
MD5 b92405154a1ca203d49c4cc53457e113
BLAKE2b-256 91353f9b1dc81b91629ae2d1ef0474bb4c15980d7925acb851d416112a8fc3ff

See more details on using hashes here.

File details

Details for the file python_semantic_release-3.5.0-py2.7.egg.

File metadata

File hashes

Hashes for python_semantic_release-3.5.0-py2.7.egg
Algorithm Hash digest
SHA256 be0b456b56d81e6f19c145ddf824b5558baa116248472883f82e8dbbce40e511
MD5 996642dad24bb87d7bfc00a431bcea67
BLAKE2b-256 6152fb4fbb8c9775bad774273d826223a25c8876594672dddb0665b8dcde27f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page