comparison garcon/pypi.py @ 650:1e543ed2bf38

cm: Tweaks to the release script. * Submit the new CHANGELOG. * Only one flag to not do destructive things.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 16 Feb 2016 22:32:36 -0800
parents 1696f0a41cfc
children a04288f199a5
comparison
equal deleted inserted replaced
649:e6d9eed35c8e 650:1e543ed2bf38
1 from invoke import task, run 1 from invoke import task, run
2 2
3 3
4 @task 4 @task
5 def makerelease(version, notag=False, noupload=False): 5 def makerelease(version, local_only=False):
6 if not version: 6 if not version:
7 raise Exception("You must specify a version!") 7 raise Exception("You must specify a version!")
8 8
9 # FoodTruck assets. 9 # FoodTruck assets.
10 print("Update node modules") 10 print("Update node modules")
15 run("gulp") 15 run("gulp")
16 16
17 # CHANGELOG.rst 17 # CHANGELOG.rst
18 run("invoke changelog --last %s" % version) 18 run("invoke changelog --last %s" % version)
19 19
20 # Tag in Mercurial, which will then be used for PyPi version. 20 if not local_only:
21 if not notag: 21 # Submit the CHANGELOG.
22 run('hg commit CHANGELOG.rst -m "cm: Regenerate the CHANGELOG."')
23
24 # Tag in Mercurial, which will then be used for PyPi version.
22 run("hg tag %s" % version) 25 run("hg tag %s" % version)
23 26
24 # PyPi upload. 27 # PyPi upload.
25 if not noupload:
26 run("python setup.py sdist upload") 28 run("python setup.py sdist upload")
27 29