annotate garcon/pypi.py @ 648:1696f0a41cfc

cm: Update npm modules and bower packages before making a release.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 16 Feb 2016 22:16:31 -0800
parents 79aefe82c6b6
children 1e543ed2bf38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
642
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 from invoke import task, run
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 @task
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 def makerelease(version, notag=False, noupload=False):
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 if not version:
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 raise Exception("You must specify a version!")
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 # FoodTruck assets.
648
1696f0a41cfc cm: Update npm modules and bower packages before making a release.
Ludovic Chabant <ludovic@chabant.com>
parents: 642
diff changeset
10 print("Update node modules")
1696f0a41cfc cm: Update npm modules and bower packages before making a release.
Ludovic Chabant <ludovic@chabant.com>
parents: 642
diff changeset
11 run("npm install")
1696f0a41cfc cm: Update npm modules and bower packages before making a release.
Ludovic Chabant <ludovic@chabant.com>
parents: 642
diff changeset
12 print("Install Bower components")
1696f0a41cfc cm: Update npm modules and bower packages before making a release.
Ludovic Chabant <ludovic@chabant.com>
parents: 642
diff changeset
13 run("bower install")
1696f0a41cfc cm: Update npm modules and bower packages before making a release.
Ludovic Chabant <ludovic@chabant.com>
parents: 642
diff changeset
14 print("Generating FoodTruck assets")
642
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 run("gulp")
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 # CHANGELOG.rst
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 run("invoke changelog --last %s" % version)
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 # Tag in Mercurial, which will then be used for PyPi version.
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 if not notag:
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 run("hg tag %s" % version)
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24 # PyPi upload.
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 if not noupload:
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 run("python setup.py sdist upload")
79aefe82c6b6 cm: Move all scripts into a `garcon` package with `invoke` support.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27