# -*- coding: utf-8 -*-

from invoke import task, run


@task
def clean():
    run("rm -rf .coverage dist build")


@task(clean, default=True)
def test():
    run("py.test")


@task(test)
def install():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py develop")


@task(test)
def release():
    run("pandoc --from=markdown --to=rst README.md -o README.rst")
    run("python setup.py register sdist bdist_wheel")
    run("twine upload dist/*")


@task(test)
def bump(version="patch"):
    run("bumpversion %s" % version)
    run("git commit --amend")

# -*- coding: utf-8 -*-

from invoke import task


@task
def clean(context):
    context.run("rm -rf .coverage dist build")


@task(clean, default=True)
def test(context):
    context.run("py.test")


@task(test)
def install(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py develop")


@task(test)
def release(context):
    context.run("pandoc --from=markdown --to=rst README.md -o README.rst")
    context.run("python setup.py register sdist bdist_wheel")
    context.run("twine upload dist/*")


@task(test)
def bump(context, version="patch"):
    context.run("bumpversion %s" % version)
    context.run("git commit --amend")

Use new invoke's context parameter
Use new invoke's context parameter
