view garcon/pypi.py @ 647:be67fb6add5f

cm: Fixes and tweaks to the documentation generation task.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 15 Feb 2016 22:09:55 -0800
parents 79aefe82c6b6
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")