diff --git a/bake/cli.py b/bake/cli.py index 99b4579..b5acdcc 100644 --- a/bake/cli.py +++ b/bake/cli.py @@ -2,7 +2,7 @@ import sys import click import json -from .bakefile import Bakefile, NoBakefileFound +from .bakefile import Bakefile, TaskFilter, NoBakefileFound from .clint import eng_join import pygments @@ -377,6 +377,13 @@ def entrypoint( if not no_deps: tasks = task.depends_on(recursive=True) + [task] + + # Re-order tasks, because. + for i, task in enumerate(tasks[:]): + if isinstance(task, TaskFilter): + t = tasks.pop(i) + tasks.insert(i - 1, t) + else: tasks = [task] diff --git a/setup.py b/setup.py index 7e71acc..7457f96 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ URL = "https://github.com/kennethreitz/bake" EMAIL = "me@kennethreitz.org" AUTHOR = "Kenneth Reitz" REQUIRES_PYTHON = ">=3.6.0" -VERSION = "0.4.0" +VERSION = "0.4.1" # What packages are required for this module to be executed? REQUIRED = ["click", "delegator.py", "pygments", "networkx"]