view garcon/pypi.py @ 645:3060a6f26330

cm: Update the node modules before building the documentation.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 14 Feb 2016 23:58:23 -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")