mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
--sort
This commit is contained in:
+15
-7
@@ -158,14 +158,18 @@ def echo_json(obj):
|
||||
type=click.BOOL,
|
||||
help="Inherit parent shell's environment variables.",
|
||||
)
|
||||
@click.argument(
|
||||
"arguments",
|
||||
nargs=-1,
|
||||
type=click.STRING,
|
||||
# multiple=True,
|
||||
# help="task ARGV argument (can be passed multiple times).",
|
||||
@click.argument("arguments", nargs=-1, type=click.STRING)
|
||||
@click.option(
|
||||
"--silent",
|
||||
"-s",
|
||||
is_flag=True,
|
||||
type=click.BOOL,
|
||||
help="Reduce output.",
|
||||
envvar="BAKE_SILENT",
|
||||
)
|
||||
@click.option(
|
||||
"--sort", is_flag=True, type=click.BOOL, help="Sort tasks, alphabetially."
|
||||
)
|
||||
@click.option("--silent", "-s", is_flag=True, type=click.BOOL, help="Reduce output.")
|
||||
@click.option(
|
||||
"--environ-json",
|
||||
"-e",
|
||||
@@ -192,6 +196,7 @@ def entrypoint(
|
||||
environ_json,
|
||||
debug,
|
||||
silent,
|
||||
sort,
|
||||
insecure,
|
||||
allow,
|
||||
_json,
|
||||
@@ -306,6 +311,9 @@ def entrypoint(
|
||||
else:
|
||||
task_list = bakefile.tasks
|
||||
|
||||
if sort:
|
||||
task_list = sorted(task_list)
|
||||
|
||||
for _task in task_list:
|
||||
depends_on = bakefile[_task].depends_on(
|
||||
include_filters=False, recursive=True
|
||||
|
||||
Reference in New Issue
Block a user