1
0
Fork 0

Add script to perform parallel builds. (#12497)

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
This commit is contained in:
Nick Brassel 2021-05-10 01:06:44 +10:00 committed by GitHub
parent f544b60aaa
commit 1426ffc0ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 89 additions and 1 deletions

View file

@ -10,7 +10,7 @@ from milc import cli
from qmk.json_encoders import InfoJSONEncoder
from qmk.constants import COL_LETTERS, ROW_LETTERS
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.keyboard import keyboard_completer, keyboard_folder, render_layouts, render_layout
from qmk.keyboard import keyboard_completer, keyboard_folder, render_layouts, render_layout, rules_mk
from qmk.keymap import locate_keymap
from qmk.info import info_json
from qmk.path import is_keyboard
@ -124,12 +124,20 @@ def print_text_output(kb_info_json):
show_keymap(kb_info_json, False)
def print_parsed_rules_mk(keyboard_name):
rules = rules_mk(keyboard_name)
for k in sorted(rules.keys()):
print('%s = %s' % (k, rules[k]))
return
@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.')
@cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.')
@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
@cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.')
@cli.argument('-r', '--rules-mk', action='store_true', help='Render the parsed values of the keyboard\'s rules.mk file.')
@cli.subcommand('Keyboard information.')
@automagic_keyboard
@automagic_keymap
@ -146,6 +154,10 @@ def info(cli):
cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard)
return False
if bool(cli.args.rules_mk):
print_parsed_rules_mk(cli.config.info.keyboard)
return False
# Build the info.json file
kb_info_json = info_json(cli.config.info.keyboard)