view monkeys/release.py @ 490:a2a46d1774f5

Added tag 0.8.0 for changeset 5955eb74b1c2
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 01 Nov 2018 22:03:34 -0700
parents 5955eb74b1c2
children 68b3cee3c805
line wrap: on
line source

from invoke import task, run


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

    # FoodTruck assets.
    print("Update node modules")
    run("npm install")
    print("Generating Wikked assets")
    run("gulp")

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

        # PyPi upload.
        run("python setup.py sdist upload")
    else:
        print("Would tag repo with %s..." % version)
        print("Would upload to PyPi...")