Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc3ca88deb | |||
| a4e9c34387 | |||
| 742e1ce0e1 | |||
| 39df759f57 | |||
| b694c4284d | |||
| e184710036 | |||
| d67addde2d | |||
| 29541559d0 | |||
| db0b8cb9a0 | |||
| 6a0e62a078 |
@@ -0,0 +1,68 @@
|
||||
name: CLI Setup
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test_cli_linux_macos:
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
QMK_HOME: ~/qmk_firmware
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
python-version: [3.6, 3.7, 3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python -m pip install wheel
|
||||
echo "::add-path::$HOME/.local/bin"
|
||||
|
||||
- name: Install QMK CLI from source
|
||||
run: |
|
||||
python3 -m pip install -r requirements.txt
|
||||
python setup.py sdist bdist_wheel
|
||||
cd ..
|
||||
python3 -m pip install --force-reinstall --no-index --no-deps --prefix=~/.local --find-links qmk_cli/dist qmk
|
||||
|
||||
- name: Run qmk setup -y
|
||||
run: qmk setup -y
|
||||
|
||||
test_cli_win:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.8]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Set up MSYS2
|
||||
uses: qmk/setup-msys2@v1
|
||||
with:
|
||||
update: true
|
||||
|
||||
- name: (MSYS2) Install git and python3
|
||||
run: msys2do pacman -S git python3-pip --noconfirm
|
||||
|
||||
- name: (MSYS2) Upgrade pip and setuptools and install wheel
|
||||
run: |
|
||||
msys2do python3 -m pip install --upgrade pip setuptools
|
||||
msys2do python3 -m pip install wheel
|
||||
|
||||
- name: (MSYS2) Install QMK CLI from source
|
||||
run: msys2do ./setup_msys.sh $(cygpath "${{ github.workspace }}")
|
||||
|
||||
- name: (MSYS2) Run qmk setup -y
|
||||
run: msys2do qmk setup -y
|
||||
@@ -1,5 +1,5 @@
|
||||
# QMK CLI
|
||||
|
||||

|
||||
A program to help users work with [QMK Firmware](https://qmk.fm/).
|
||||
|
||||
# Features
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
"""A program to help you work with qmk_firmware."""
|
||||
|
||||
__version__ = '0.0.28'
|
||||
__version__ = '0.0.29'
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
"""CLI wrapper for running QMK commands.
|
||||
|
||||
This program can be run from anywhere, with or without a qmk_firmware repository. If a qmk_firmware repository can be located we will use that to augment our available subcommands.
|
||||
|
||||
FIXME(skullydazed/anyone): --help shows underscores where we want dashes in subcommands (EG json_keymap instead of json-keymap)
|
||||
TODO(skullydazed/anyone): Need a way to filter some subcommands from --help (EG `qmk hello`)
|
||||
"""
|
||||
import argparse
|
||||
import os
|
||||
@@ -67,6 +64,11 @@ def find_qmk_firmware():
|
||||
def main():
|
||||
"""Setup the environment before dispatching to the entrypoint.
|
||||
"""
|
||||
# Warn if they use an outdated python version
|
||||
if sys.version_info < (3, 6):
|
||||
print('Warning: Your Python version is out of date! Some subcommands may not work!')
|
||||
print('Please upgrade to Python 3.6 or later.')
|
||||
|
||||
# Environment setup
|
||||
import qmk_cli
|
||||
milc.cli.version = qmk_cli.__version__
|
||||
|
||||
@@ -35,7 +35,7 @@ def setup(cli):
|
||||
# Run `qmk_firmware/bin/qmk doctor` to check the rest of the environment out
|
||||
if qmk_firmware.exists():
|
||||
qmk_bin = qmk_firmware / 'bin' / 'qmk'
|
||||
doctor = subprocess.run([sys.executable, qmk_bin, 'doctor'])
|
||||
doctor = subprocess.run([sys.executable, str(qmk_bin), 'doctor'])
|
||||
if doctor.returncode != 0:
|
||||
cli.log.error('Your build environment is not setup completely.')
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.0.28
|
||||
current_version = 0.0.29
|
||||
commit = True
|
||||
tag = True
|
||||
tag_name = {new_version}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
cp -r $1 ~/qmk_cli
|
||||
|
||||
export PATH=~/.local/bin:$PATH
|
||||
echo "PATH=$PATH" >> ~/.bashrc
|
||||
|
||||
export QMK_HOME=~/qmk_firmware
|
||||
export CLI_DIR=~/qmk_cli
|
||||
|
||||
cd $CLI_DIR
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 setup.py sdist bdist_wheel
|
||||
cd ~
|
||||
python3 -m pip install --force-reinstall --no-index --no-deps --prefix=~/.local --find-links qmk_cli/dist qmk
|
||||
Reference in New Issue
Block a user