diff garcon/pypi.py @ 642:79aefe82c6b6

cm: Move all scripts into a `garcon` package with `invoke` support.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 14 Feb 2016 22:11:24 -0800
parents
children 1696f0a41cfc
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/garcon/pypi.py	Sun Feb 14 22:11:24 2016 -0800
@@ -0,0 +1,22 @@
+from invoke import task, run
+
+
+@task
+def makerelease(version, notag=False, noupload=False):
+    if not version:
+        raise Exception("You must specify a version!")
+
+    # FoodTruck assets.
+    run("gulp")
+
+    # CHANGELOG.rst
+    run("invoke changelog --last %s" % version)
+
+    # Tag in Mercurial, which will then be used for PyPi version.
+    if not notag:
+        run("hg tag %s" % version)
+
+    # PyPi upload.
+    if not noupload:
+        run("python setup.py sdist upload")
+