# HG changeset patch # User Ludovic Chabant # Date 1455690756 28800 # Node ID 1e543ed2bf38de3dd6d5900a752b138f6079f9d6 # Parent e6d9eed35c8ee343de08d5853baeda68dfc87710 cm: Tweaks to the release script. * Submit the new CHANGELOG. * Only one flag to not do destructive things. diff -r e6d9eed35c8e -r 1e543ed2bf38 garcon/pypi.py --- a/garcon/pypi.py Tue Feb 16 22:31:42 2016 -0800 +++ b/garcon/pypi.py Tue Feb 16 22:32:36 2016 -0800 @@ -2,7 +2,7 @@ @task -def makerelease(version, notag=False, noupload=False): +def makerelease(version, local_only=False): if not version: raise Exception("You must specify a version!") @@ -17,11 +17,13 @@ # CHANGELOG.rst run("invoke changelog --last %s" % version) - # Tag in Mercurial, which will then be used for PyPi version. - if not notag: + 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. - if not noupload: + # PyPi upload. run("python setup.py sdist upload")