view garcon/pypi.py @ 693:d2a87365b85b

bake: Use threads to read/write from/to the main arbitrator process. Since the GIL is released most of the time during blocking I/O operations, this should let the worker threads do more during that time.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 23 Mar 2016 01:53:57 -0700
parents a04288f199a5
children 9231172e3d81
line wrap: on
line source

from invoke import task, run


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

    # FoodTruck assets.
    print("Update node modules")
    run("npm install")
    print("Install Bower components")
    run("bower install")
    print("Generating FoodTruck assets")
    run("gulp")

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

    if not local_only:
        # Submit the CHANGELOG.
        run('hg commit CHANGELOG.rst -m "cm: Regenerate the CHANGELOG."')

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

        # PyPi upload.
        run("python setup.py version")
        run("python setup.py sdist upload")