view monkeys/release.py @ 476:71114096433c

core: Add support for Markdown extensions, add header anchor extension. - New configuration option to specify Markdown extensions. - Enable some extensions by default. - Add CSS to make tables pretty. - Add extension to generate anchors next to each HTML heading. - Provide CSS to show those anchors on mouse-hover.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 11 Oct 2018 23:24:06 -0700
parents d8a1a031ad7d
children 5955eb74b1c2
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("grunt")

    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...")