Code Monkey home page Code Monkey logo

python-semantic-release's Introduction

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.

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.
  --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.

python-semantic-release's People

Contributors

argos83 avatar blackhatmonkey avatar edwelker avatar haeric avatar halkeye avatar honzajavorek avatar jezdez avatar kenmercuslai avatar relekang avatar salimfadhley avatar skorokithakis avatar sobolevn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.