1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
from invoke import task
@task
def clean_html(c):
print("Cleaning HTML")
@task
def clean_tgz(c):
print("Cleaning .tar.gz files")
@task(clean_html, clean_tgz)
def clean(c):
print("Cleaned everything")
@task
def makedirs(c):
print("Making directories")
@task(clean, makedirs)
def build(c):
print("Building")
@task
def pretest(c):
print("Preparing for testing")
@task(pretest)
def test(c):
print("Testing")
@task(build, post=[test])
def deploy(c):
print("Deploying")
|