mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-02-04 11:25:31 +00:00
chore(lib/utils) update from mainline
This commit is contained in:
@@ -47,6 +47,7 @@ def userspace_add(cli):
|
||||
from qmk.cli.new.keymap import new_keymap
|
||||
cli.config.new_keymap.keyboard = cli.args.keyboard
|
||||
cli.config.new_keymap.keymap = cli.args.keymap
|
||||
cli.args.skip_converter = True
|
||||
if new_keymap(cli) is not False:
|
||||
userspace.add_target(keyboard=cli.args.keyboard, keymap=cli.args.keymap, build_env=build_env)
|
||||
else:
|
||||
|
||||
@@ -20,6 +20,7 @@ def _extra_arg_setter(target, extra_args):
|
||||
@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs; 0 means unlimited.")
|
||||
@cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove object files before compiling.")
|
||||
@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually build, just show the commands to be run.")
|
||||
@cli.argument('-p', '--print-failures', arg_only=True, action='store_true', help="Print failed builds.")
|
||||
@cli.argument('-e', '--env', arg_only=True, action='append', default=[], help="Set a variable to be passed to make. May be passed multiple times.")
|
||||
@cli.subcommand('Compiles the build targets specified in userspace `qmk.json`.')
|
||||
def userspace_compile(cli):
|
||||
@@ -42,4 +43,4 @@ def userspace_compile(cli):
|
||||
if len(keyboard_keymap_targets) > 0:
|
||||
build_targets.extend(search_keymap_targets(keyboard_keymap_targets))
|
||||
|
||||
return mass_compile_targets(list(set(build_targets)), cli.args.clean, cli.args.dry_run, cli.config.userspace_compile.no_temp, cli.config.userspace_compile.parallel, **build_environment(cli.args.env))
|
||||
return mass_compile_targets(list(set(build_targets)), cli.args.clean, cli.args.dry_run, cli.config.userspace_compile.no_temp, cli.config.userspace_compile.parallel, cli.args.print_failures, **build_environment(cli.args.env))
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
from milc import cli
|
||||
|
||||
from qmk.constants import QMK_FIRMWARE
|
||||
from qmk.constants import QMK_FIRMWARE, HAS_QMK_USERSPACE
|
||||
from qmk.cli.doctor.main import userspace_tests
|
||||
|
||||
|
||||
@cli.subcommand('Checks userspace configuration.')
|
||||
def userspace_doctor(cli):
|
||||
userspace_tests(QMK_FIRMWARE)
|
||||
|
||||
return 0 if HAS_QMK_USERSPACE else 1
|
||||
|
||||
Reference in New Issue
Block a user