Git Product home page Git Product logo

releaserabbit's Introduction

ReleaseRabbit

A little tool to make releasing new versions of open source Python projects easier.

In one simple command, ReleaseRabbit bumps version number in your project, pushes a github release, packs and uploads Python package to PyPI.

Usage

$ cd myproject

$ releaserabbit 1.2.3
# OR
$ releaserabbit patch
# OR
$ releaserabbit minor
# OR
$ releaserabbit major

Setup

  1. pip install releaserabbit.
  2. Setup your pypi credentials in ~/.pypirc.
  3. setup.py must pull version name from a separate version file (see snippet below). VERSION_FILE must be a constant in setup.py
    • Alternative: VERSION as a string constant in setup.py if you can't (or don't want to) expose __version__ in your actual production python code.
  4. Make sure you can push commits and tags to master.

Pulling version from a separate file

import io, re
VERSION_FILE = "cleancat/__init__.py"
with io.open(VERSION_FILE, "rt", encoding="utf8") as f:
    version = re.search(r'__version__ = ([\'"])(.*?)\1', f.read()).group(2)

releaserabbit's People

Contributors

tsx avatar dependabot[bot] avatar neob91-close avatar alecrosenbaum avatar vtclose avatar

Stargazers

Andreas Motl avatar Jacky avatar gc-ss avatar Phil Freo avatar

Watchers

Thomas Steinacher avatar Apostolis Bessas avatar Douglas Greenbaum avatar James Cloos avatar  avatar Todd Lewellen avatar Ty Thorsen avatar Stefan Wójcik avatar Lukáš Mladý avatar Carlos Ballesteros avatar  avatar Bart Gryszko avatar Kevin Schumacher avatar Joe Kemp avatar André Junges avatar Vitor Buzinaro avatar Claudia Herput (Oprea) avatar  avatar

releaserabbit's Issues

Check whether HEAD is origin/master before continuing

When running the release with releaserabbit we want to make sure that there are no unpushed commits on the master branch. These can happen when a previous releaserabbit run fails, and leaves some version bump commits (but could happen due to user error too). We should do this check by fetching origin/master and making sure its top commit is the same as current HEAD.

CC @vtclose @AlecRosenbaum

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.