Compare commits

..

6 Commits

Author SHA1 Message Date
Zach White b5e8aa4cac New release: 0.0.45 → 0.0.46 2021-05-08 21:04:06 -07:00
Zach White 1c6d81fc3b add hid and pyusb to the requirements 2021-05-08 21:03:31 -07:00
Erovia 0ffae74377 Merge pull request #49 from zvecr/env_command 2021-05-08 13:00:46 +02:00
zvecr cbe3ad0248 Expose is_qmk_firmware status 2021-04-08 23:41:12 +01:00
zvecr 97689b53d7 Add cli.config.general 2021-04-05 21:29:56 +01:00
zvecr 054e071787 Add env subcommand 2021-04-05 21:01:29 +01:00
5 changed files with 35 additions and 2 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
"""A program to help you work with qmk_firmware."""
__version__ = '0.0.45'
__version__ = '0.0.46'
+1
View File
@@ -3,4 +3,5 @@
We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup.
"""
from . import clone # noqa
from . import env # noqa
from . import setup # noqa
+30
View File
@@ -0,0 +1,30 @@
"""Prints environment information.
"""
import os
from pathlib import Path
from milc import cli
from qmk_cli.helpers import is_qmk_firmware
@cli.argument('var', default=None, nargs='?', help='Optional variable to query')
@cli.subcommand('Prints environment information.')
def env(cli):
home = os.environ.get('QMK_HOME', "")
data = {
'QMK_HOME': home,
'QMK_FIRMWARE': home if is_qmk_firmware(Path(home)) else ""
}
# Now munge the current cli config
for key, val in cli.config.general.items():
converted_key = 'QMK_' + key.upper()
data[converted_key] = val
if cli.args.var:
# dump out requested arg
print(data[cli.args.var])
else:
# dump out everything
for key, val in data.items():
print(f'{key}="{val}"')
+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.45
current_version = 0.0.46
commit = True
tag = True
tag_name = {new_version}
+2
View File
@@ -45,11 +45,13 @@ if __name__ == "__main__":
"colorama",
"dotty-dict",
"flake8",
"hid",
"hjson",
"jsonschema>=3",
"milc>=1.3.0",
"nose2",
"pygments",
"pyusb",
"yapf"
]
)