view garcon/pypi.py @ 816:d9b1e5ad869f

docs: Add space before link I always thought that adding a break line, it would automatically add a space. But from the current documentation page https://bolt80.com/piecrust/en/latest/getting-started/, looks like if the next line starts with a link, it gets truncated.
author Bruno P. Kinoshita <kinow@users.noreply.github.com>
date Sat, 22 Oct 2016 21:26:41 +1300
parents 9231172e3d81
children 22cf13b86cc3 bd269692dbb4
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 and documentation changelog page.
    run("invoke changelog --last %s" % version)
    run("invoke changelog --last %s -o docs/pages/support/changelog.md" %
            version)

    if not local_only:
        # Submit the CHANGELOG.
        run('hg commit CHANGELOG.rst docs/pages/support/changelog.md '
            '-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")
    else:
        print("Would submit changelog files...")
        print("Would tag repo with %s..." % version)
        print("Would upload to PyPi...")