Skip to content

Commit

Permalink
cm: Add script for making a release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovicchabant committed Mar 31, 2017
1 parent 19883d4 commit 74f3e8f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
23 changes: 23 additions & 0 deletions monkeys/release.py
@@ -0,0 +1,23 @@
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("Generating Wikked assets")
run("grunt")

if not local_only:
# Tag in Mercurial, which will then be used for PyPi version.
run("hg tag %s" % version)

# PyPi upload.
run("python setup.py sdist upload")
else:
print("Would tag repo with %s..." % version)
print("Would upload to PyPi...")
6 changes: 6 additions & 0 deletions tasks.py
@@ -0,0 +1,6 @@
from invoke import Collection
from monkeys.release import makerelease


ns = Collection()
ns.add_task(makerelease, name='release')

0 comments on commit 74f3e8f

Please sign in to comment.