view garcon/pypi.py @ 642:79aefe82c6b6

cm: Move all scripts into a `garcon` package with `invoke` support.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 14 Feb 2016 22:11:24 -0800
parents
children 1696f0a41cfc
line wrap: on
line source

from invoke import task, run


@task
def makerelease(version, notag=False, noupload=False):
    if not version:
        raise Exception("You must specify a version!")

    # FoodTruck assets.
    run("gulp")

    # CHANGELOG.rst
    run("invoke changelog --last %s" % version)

    # Tag in Mercurial, which will then be used for PyPi version.
    if not notag:
        run("hg tag %s" % version)

    # PyPi upload.
    if not noupload:
        run("python setup.py sdist upload")