Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b30a9766d | |||
| 982349a450 | |||
| 4d161c9ec4 | |||
| 047eb00594 | |||
| 558251860a | |||
| b685fe5d3f | |||
| e447fb4252 | |||
| 066a865084 |
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
"""A program to help you work with qmk_firmware."""
|
"""A program to help you work with qmk_firmware."""
|
||||||
|
|
||||||
__version__ = '0.0.48'
|
__version__ = '0.0.51'
|
||||||
|
|||||||
@@ -11,13 +11,17 @@ from platform import platform
|
|||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
|
|
||||||
import milc
|
import milc
|
||||||
import milc.subcommand.config # noqa
|
|
||||||
from milc.questions import yesno
|
|
||||||
|
|
||||||
|
from . import __version__
|
||||||
from .helpers import find_qmk_firmware, is_qmk_firmware
|
from .helpers import find_qmk_firmware, is_qmk_firmware
|
||||||
|
|
||||||
|
milc.set_metadata(version=__version__)
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
|
# These must happen after the milc.set_metadata() call
|
||||||
|
import milc.subcommand.config # noqa, must come after milc.set_metadata()
|
||||||
|
from milc.questions import yesno
|
||||||
|
|
||||||
|
|
||||||
@milc.cli.entrypoint('CLI wrapper for running QMK commands.')
|
@milc.cli.entrypoint('CLI wrapper for running QMK commands.')
|
||||||
def qmk_main(cli):
|
def qmk_main(cli):
|
||||||
@@ -56,8 +60,6 @@ def main():
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Environment setup
|
# Environment setup
|
||||||
import qmk_cli
|
|
||||||
milc.cli.version = qmk_cli.__version__
|
|
||||||
qmk_firmware = find_qmk_firmware()
|
qmk_firmware = find_qmk_firmware()
|
||||||
os.environ['QMK_HOME'] = str(qmk_firmware)
|
os.environ['QMK_HOME'] = str(qmk_firmware)
|
||||||
os.environ['ORIG_CWD'] = os.getcwd()
|
os.environ['ORIG_CWD'] = os.getcwd()
|
||||||
|
|||||||
@@ -87,12 +87,13 @@ def setup(cli):
|
|||||||
# Offer to set `user.qmk_home` for them.
|
# Offer to set `user.qmk_home` for them.
|
||||||
if str(cli.args.home) != os.environ['QMK_HOME'] and yesno(home_prompt):
|
if str(cli.args.home) != os.environ['QMK_HOME'] and yesno(home_prompt):
|
||||||
cli.config['user']['qmk_home'] = str(cli.args.home.absolute())
|
cli.config['user']['qmk_home'] = str(cli.args.home.absolute())
|
||||||
|
cli.config_source['user']['qmk_home'] = 'config_file'
|
||||||
cli.write_config_option('user', 'qmk_home')
|
cli.write_config_option('user', 'qmk_home')
|
||||||
|
|
||||||
# Run `qmk doctor` to check the rest of the environment out
|
# Run `qmk doctor` to check the rest of the environment out
|
||||||
color = '--color' if cli.config.general.color else '--no-color'
|
color = '--color' if cli.config.general.color else '--no-color'
|
||||||
unicode = '--unicode' if cli.config.general.unicode else '--no-unicode'
|
unicode = '--unicode' if cli.config.general.unicode else '--no-unicode'
|
||||||
doctor_command = [sys.argv[0], color, unicode, 'doctor']
|
doctor_command = [Path(sys.argv[0]).as_posix(), color, unicode, 'doctor']
|
||||||
|
|
||||||
if cli.args.no:
|
if cli.args.no:
|
||||||
doctor_command.append('--no')
|
doctor_command.append('--no')
|
||||||
|
|||||||
@@ -3,30 +3,5 @@
|
|||||||
#
|
#
|
||||||
# Required packages: pip3 install bumpversion twine
|
# Required packages: pip3 install bumpversion twine
|
||||||
|
|
||||||
set -e
|
echo "Use the github action instead!"
|
||||||
set -x
|
exit 1
|
||||||
|
|
||||||
PYPI_USERNAME=${PYPI_USERNAME:=skully}
|
|
||||||
FLIT_USERNAME=$PYPI_USERNAME
|
|
||||||
TWINE_USERNAME=$PYPI_USERNAME
|
|
||||||
|
|
||||||
export FLIT_USERNAME TWINE_USERNAME
|
|
||||||
|
|
||||||
if ! bumpversion -h &> /dev/null; then
|
|
||||||
echo "Missing bumpversion! Please run: pip3 install -U -r requirements-dev.txt"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! twine -h &> /dev/null; then
|
|
||||||
echo "Missing twine! Please run: pip3 install -U -r requirements-dev.txt"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Bump the version, tag, and push
|
|
||||||
rm -f dist/*
|
|
||||||
bumpversion patch
|
|
||||||
git push origin master --tags
|
|
||||||
|
|
||||||
# Build and upload
|
|
||||||
python3 setup.py sdist bdist_wheel
|
|
||||||
twine upload dist/qmk-*
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.0.48
|
current_version = 0.0.51
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
|
|||||||
@@ -40,15 +40,12 @@ if __name__ == "__main__":
|
|||||||
],
|
],
|
||||||
python_requires=metadata['requires-python'],
|
python_requires=metadata['requires-python'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"appdirs",
|
|
||||||
"argcomplete",
|
|
||||||
"colorama",
|
|
||||||
"dotty-dict",
|
"dotty-dict",
|
||||||
"flake8",
|
"flake8",
|
||||||
"hid",
|
"hid",
|
||||||
"hjson",
|
"hjson",
|
||||||
"jsonschema>=3",
|
"jsonschema>=3",
|
||||||
"milc>=1.3.0",
|
"milc>=1.4.0",
|
||||||
"nose2",
|
"nose2",
|
||||||
"pygments",
|
"pygments",
|
||||||
"pyusb",
|
"pyusb",
|
||||||
|
|||||||
Reference in New Issue
Block a user