Compare commits

...

11 Commits

Author SHA1 Message Date
skullY 212e185b62 New release: 0.0.16 → 0.0.17 2019-10-23 22:54:53 -07:00
zvecr b7d0a65bdf Fix No such file or directory: 'C:\\dev\\null' 2019-10-23 22:51:53 -07:00
skullY 221d42fec1 sync milc.py with qmk_firmware 2019-10-23 22:47:50 -07:00
skullY f3e83794c9 New release: 0.0.15 → 0.0.16 2019-10-12 13:18:31 -07:00
zvecr 73628cc6b0 Fix in_qmk_firmware for Python 3.5 2019-10-12 13:15:15 -07:00
skullY e077319a16 New release: 0.0.14 → 0.0.15 2019-10-08 07:23:09 -07:00
skullY 5b0ba9a25d Document release requirements 2019-10-08 07:22:56 -07:00
skullY bd4e9bf9cf Add hjson to requirements 2019-10-08 07:20:26 -07:00
Nikita Titov b2974b4219 read README with utf-8 and close file after reading 2019-10-04 07:45:02 -07:00
skullY be0dd95e46 New release: 0.0.13 → 0.0.14 2019-09-25 12:00:35 -07:00
skullY 30031a8cd7 Fix qmk clone 2019-09-25 12:00:32 -07:00
7 changed files with 28 additions and 18 deletions
+8 -7
View File
@@ -39,7 +39,7 @@ import colorama
from appdirs import user_config_dir
# Disable logging until we can configure it how the user wants
logging.basicConfig(filename='/dev/null')
logging.basicConfig(stream=os.devnull)
# Log Level Representations
EMOJI_LOGLEVELS = {
@@ -180,13 +180,13 @@ class ConfigurationSection(Configuration):
self.parent = parent
def __getitem__(self, key):
"""Returns a config value, pulling from the `default` section as a fallback.
"""Returns a config value, pulling from the `user` section as a fallback.
"""
if key in self._config:
return self._config[key]
elif key in self.parent.default:
return self.parent.default[key]
elif key in self.parent.user:
return self.parent.user[key]
return None
@@ -429,11 +429,12 @@ class MILC(object):
self.arg_only.append(arg_name)
del kwargs['arg_only']
name = handler.__name__.replace("_", "-")
if handler is self._entrypoint:
self.add_argument(*args, **kwargs)
elif handler.__name__ in self.subcommands:
self.subcommands[handler.__name__].add_argument(*args, **kwargs)
elif name in self.subcommands:
self.subcommands[name].add_argument(*args, **kwargs)
else:
raise RuntimeError('Decorated function is not entrypoint or subcommand!')
@@ -599,7 +600,7 @@ class MILC(object):
self.add_subparsers()
if not name:
name = handler.__name__
name = handler.__name__.replace("_", "-")
self.acquire_lock()
kwargs['help'] = description
+1 -1
View File
@@ -1,3 +1,3 @@
"""A program to help you work with qmk_firmware."""
__version__ = '0.0.13'
__version__ = '0.0.17'
+1 -1
View File
@@ -33,7 +33,7 @@ def in_qmk_firmware():
while len(cur_dir.parents) > 0:
found_bin = cur_dir / 'bin' / 'qmk'
if found_bin.is_file():
command = [found_bin, '--version']
command = [found_bin.as_posix(), '--version']
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode == 0:
+9 -6
View File
@@ -4,19 +4,22 @@ import os
from pathlib import Path
from milc import cli
from qmk_cli.git import clone
from qmk_cli.git import clone as git_clone
default_repo = 'qmk_firmware'
default_fork = 'qmk/' + default_repo
default_branch = 'master'
@cli.argument('--baseurl', default='https://github.com', help='The URL all git operations start from.')
@cli.argument('-b', '--branch', default=default_branch, help='The branch to clone.')
@cli.argument('destination', default=os.environ['QMK_HOME'], nargs='?', help='The directory to clone to.')
@cli.argument('fork', default=default_fork, nargs='?', help='The qmk_firmware fork to clone')
@cli.argument('--baseurl', default='https://github.com', help='The URL all git operations start from (Default: https://github.com)')
@cli.argument('-b', '--branch', default=default_branch, help='The branch to clone (Default: %s)' % default_branch)
@cli.argument('destination', default=None, nargs='?', help='The directory to clone to (Default: Current Directory)')
@cli.argument('fork', default=default_fork, nargs='?', help='The qmk_firmware fork to clone (Default: %s)' % default_fork)
@cli.subcommand('Clone a qmk_firmware fork.')
def clone(cli):
if not cli.args.destination:
cli.args.destination = os.path.join(os.environ['ORIG_CWD'], default_fork.split('/')[-1])
qmk_firmware = Path(cli.args.destination)
git_url = '/'.join((cli.config.clone.baseurl, cli.args.fork))
@@ -24,5 +27,5 @@ def clone(cli):
cli.log.error('Destination already exists: %s', cli.args.destination)
exit(1)
success = clone(git_url, cli.args.destination, cli.config.clone.branch)
success = git_clone(git_url, cli.args.destination, cli.config.clone.branch)
exit(0 if success else 1)
+3
View File
@@ -1,5 +1,8 @@
#!/bin/sh
# Increment the verison number and release a new version of qmk_cli.
#
# Required packages: pip3 install bumpversion twine
set -e
set -x
+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.13
current_version = 0.0.17
commit = True
tag = True
tag_name = {new_version}
+5 -2
View File
@@ -6,6 +6,8 @@ setup_cfg.read('setup.cfg')
metadata = setup_cfg['metadata']
if __name__ == "__main__":
with open('README.md', encoding='utf-8') as readme_file:
long_description=readme_file.read()
setup(
name=metadata['dist-name'],
description='A program to help users work with QMK Firmware.',
@@ -19,7 +21,7 @@ if __name__ == "__main__":
author_email=metadata['author-email'],
maintainer=metadata['author'],
maintainer_email=metadata['author-email'],
long_description=open('README.md').read(),
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
py_modules = ['milc'],
@@ -41,6 +43,7 @@ if __name__ == "__main__":
#"milc", #FIXME(skullydazed): Included in the repo for now.
"appdirs",
"argcomplete",
"colorama"
"colorama",
"hjson"
],
)