From 7cfa5de6d7dfd591e04f051996453a928734134f Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 23 Sep 2023 14:03:08 +1000 Subject: [PATCH] Allow for `qmk mass-compile all:` --- lib/python/qmk/cli/mass_compile.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/mass_compile.py b/lib/python/qmk/cli/mass_compile.py index 1032dc82d14d..2013994afbd4 100755 --- a/lib/python/qmk/cli/mass_compile.py +++ b/lib/python/qmk/cli/mass_compile.py @@ -41,7 +41,17 @@ def mass_compile(cli): makefile = builddir / 'parallel_kb_builds.mk' if len(cli.args.builds) > 0: - targets = list(sorted(set([(resolve_keyboard(e[0]), e[1]) for e in [b.split(':') for b in cli.args.builds]]))) + targets = [] + for target in cli.args.builds: + split_target = target.split(':') + if len(split_target) != 2: + cli.log.error(f"Invalid build target: {target}") + return False + if split_target[0] == 'all': + targets.extend(search_keymap_targets(split_target[1], [])) + else: + targets.append((resolve_keyboard(split_target[0]), split_target[1])) + targets = list(sorted(set([(e[0], e[1]) for e in targets]))) else: targets = search_keymap_targets(cli.args.keymap, cli.args.filter)