Intelligently skip tasks with skip_ifs

Try it!

Test with SKIP_MYTASK=1 invoke mytask

tasks.py

1
2
3
4
5
6
7
from invoke import task
import os


@task(skip_ifs=[task(lambda ctx: os.getenv("SKIP_MYTASK", False))])
def mytask(ctx):
    print("Didn't skip!")