Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f7125127f1 | |||
| f8fe363999 |
@@ -44,14 +44,13 @@ jobs:
|
|||||||
- name: (MSYS2) Install Python dependencies
|
- name: (MSYS2) Install Python dependencies
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install wheel
|
python3 -m pip install -U setuptools wheel
|
||||||
- name: (MSYS2) Install QMK CLI from source
|
- name: (MSYS2) Install QMK CLI from source
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -U build
|
||||||
python3 setup.py sdist bdist_wheel
|
python3 -m build
|
||||||
cd ..
|
python3 -m pip install dist/qmk-*.tar.gz
|
||||||
python3 -m pip install --force-reinstall --no-index --no-deps --find-links qmk_cli/dist qmk
|
|
||||||
- name: (MSYS2) Run qmk setup -y
|
- name: (MSYS2) Run qmk setup -y
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: qmk setup -y
|
run: qmk setup -y
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
run: ./ci_tests
|
run: ./ci_tests
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
pip install setuptools wheel
|
pip install setuptools wheel
|
||||||
pip install -r requirements-dev.txt
|
pip install -r requirements-dev.txt
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
TWINE_USERNAME: qmk
|
TWINE_USERNAME: qmk
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python3 -m build
|
||||||
twine upload dist/*
|
twine upload dist/*
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v1.10.0
|
uses: docker/login-action@v1.10.0
|
||||||
@@ -58,3 +58,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: qmkfm/qmk_cli:latest
|
tags: qmkfm/qmk_cli:latest
|
||||||
|
- name: Trigger OS package builds
|
||||||
|
run: ./trigger_packages
|
||||||
|
env:
|
||||||
|
QMK_BOT_TOKEN: ${{ secrets.QMK_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools>=42",
|
||||||
|
"wheel"
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
+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.3.0'
|
__version__ = '0.3.1'
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
bleach==4.0.0
|
bleach==4.0.0
|
||||||
|
build==0.6.0.post1
|
||||||
bump2version==1.0.1
|
bump2version==1.0.1
|
||||||
bumpversion==0.6.0
|
bumpversion==0.6.0
|
||||||
certifi==2021.5.30
|
certifi==2021.5.30
|
||||||
cffi==1.14.6
|
cffi==1.14.6
|
||||||
chardet==4.0.0
|
chardet==4.0.0
|
||||||
colorama==0.4.4
|
|
||||||
cryptography==3.4.7
|
cryptography==3.4.7
|
||||||
docutils==0.17.1
|
docutils==0.17.1
|
||||||
idna==2.10
|
idna==2.10
|
||||||
@@ -14,7 +14,6 @@ keyring==23.0.1
|
|||||||
packaging==21.0
|
packaging==21.0
|
||||||
pkginfo==1.7.1
|
pkginfo==1.7.1
|
||||||
pycparser==2.20
|
pycparser==2.20
|
||||||
Pygments==2.9.0
|
|
||||||
pyparsing==2.4.7
|
pyparsing==2.4.7
|
||||||
readme-renderer==29.0
|
readme-renderer==29.0
|
||||||
requests==2.26.0
|
requests==2.26.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.3.0
|
current_version = 0.3.1
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
@@ -16,17 +16,58 @@ universal = 1
|
|||||||
ignore = E501,E226
|
ignore = E501,E226
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
|
name = qmk
|
||||||
|
version = 0.3.0
|
||||||
author = skullydazed
|
author = skullydazed
|
||||||
author-email = skullydazed@gmail.com
|
author_email = skullydazed@gmail.com
|
||||||
description-file = README.md
|
description = A program to help users work with QMK Firmware.
|
||||||
dist-name = qmk
|
long_description = file: README.md
|
||||||
license_file = LICENSE
|
long_description_content_type = text/markdown
|
||||||
module = qmk_cli
|
license = MIT License
|
||||||
home-page = https://github.com/qmk/qmk_cli
|
project_urls =
|
||||||
requires-python = >=3.7
|
Bug Tracker = https://github.com/qmk/qmk_cli/issues
|
||||||
|
Documentation = https://docs.qmk.fm/#/cli
|
||||||
|
Homepage = https://qmk.fm/
|
||||||
|
Source = https://github.com/qmk/qmk_cli/
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 3 - Alpha
|
||||||
|
Environment :: Console
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: System Administrators
|
||||||
|
Intended Audience :: End Users/Desktop
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Natural Language :: English
|
||||||
|
Programming Language :: Python :: 3 :: Only
|
||||||
|
Topic :: Scientific/Engineering
|
||||||
|
Topic :: Software Development
|
||||||
|
Topic :: Utilities
|
||||||
|
|
||||||
[entry_points]
|
[options]
|
||||||
qmk = qmk_cli.script_qmk:main
|
install_requires =
|
||||||
|
appdirs==1.4.4
|
||||||
|
argcomplete==1.12.3
|
||||||
|
attrs==21.2.0
|
||||||
|
colorama==0.4.4
|
||||||
|
coverage==5.5
|
||||||
|
halo==0.0.31
|
||||||
|
hid==1.0.4
|
||||||
|
log-symbols==0.0.14
|
||||||
|
mccabe==0.6.1
|
||||||
|
milc==1.5.0
|
||||||
|
pycodestyle==2.7.0
|
||||||
|
pyflakes==2.3.1
|
||||||
|
pyrsistent==0.18.0
|
||||||
|
pyusb==1.2.1
|
||||||
|
setuptools>=45
|
||||||
|
six==1.16.0
|
||||||
|
spinners==0.0.24
|
||||||
|
termcolor==1.1.0
|
||||||
|
packages = find:
|
||||||
|
python_requiures = >=3.7
|
||||||
|
|
||||||
|
[options.entry_points]
|
||||||
|
console_scripts =
|
||||||
|
qmk = qmk_cli.script_qmk:main
|
||||||
|
|
||||||
[yapf]
|
[yapf]
|
||||||
align_closing_bracket_with_visual_indent = True
|
align_closing_bracket_with_visual_indent = True
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
from configparser import ConfigParser
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
setup_cfg = ConfigParser()
|
|
||||||
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.',
|
|
||||||
entry_points={
|
|
||||||
'console_scripts': ['%s = %s' % i for i in setup_cfg['entry_points'].items()],
|
|
||||||
},
|
|
||||||
license='MIT License',
|
|
||||||
url=metadata['home-page'],
|
|
||||||
version=setup_cfg['bumpversion']['current_version'],
|
|
||||||
author=metadata['author'],
|
|
||||||
author_email=metadata['author-email'],
|
|
||||||
maintainer=metadata['author'],
|
|
||||||
maintainer_email=metadata['author-email'],
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
packages=find_packages(),
|
|
||||||
py_modules=['qmk_cli'],
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 3 - Alpha',
|
|
||||||
'Environment :: Console',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'Intended Audience :: System Administrators',
|
|
||||||
'Intended Audience :: End Users/Desktop',
|
|
||||||
'License :: OSI Approved :: MIT License',
|
|
||||||
'Natural Language :: English',
|
|
||||||
'Programming Language :: Python :: 3 :: Only',
|
|
||||||
'Topic :: Scientific/Engineering',
|
|
||||||
'Topic :: Software Development',
|
|
||||||
'Topic :: Utilities',
|
|
||||||
],
|
|
||||||
python_requires=metadata['requires-python'],
|
|
||||||
install_requires=[
|
|
||||||
"appdirs==1.4.4",
|
|
||||||
"argcomplete==1.12.3",
|
|
||||||
"attrs==21.2.0",
|
|
||||||
"colorama==0.4.4",
|
|
||||||
"coverage==5.5",
|
|
||||||
"qmk-dotty-dict==1.3.0.post1",
|
|
||||||
"flake8==3.9.2",
|
|
||||||
"halo==0.0.31",
|
|
||||||
"hid==1.0.4",
|
|
||||||
"hjson==3.0.2",
|
|
||||||
"jsonschema==3.2.0",
|
|
||||||
"log-symbols==0.0.14",
|
|
||||||
"mccabe==0.6.1",
|
|
||||||
"milc==1.5.0",
|
|
||||||
"nose2==0.10.0",
|
|
||||||
"pycodestyle==2.7.0",
|
|
||||||
"pyflakes==2.3.1",
|
|
||||||
"Pygments==2.9.0",
|
|
||||||
"pyrsistent==0.18.0",
|
|
||||||
"pyusb==1.2.1",
|
|
||||||
"setuptools>=45",
|
|
||||||
"six==1.16.0",
|
|
||||||
"spinners==0.0.24",
|
|
||||||
"termcolor==1.1.0",
|
|
||||||
"yapf==0.31.0"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Trigger workflows that build QMK packages.
|
||||||
|
"""
|
||||||
|
from os import environ
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
# Pull in environment vars
|
||||||
|
gh_user = environ.get('GH_USERNAME', 'qmk-bot')
|
||||||
|
gh_pat = environ.get('QMK_BOT_TOKEN', '')
|
||||||
|
gh_repo_owner = environ.get('REPO_OWNER', 'qmk')
|
||||||
|
gh_repo_name = environ.get('REPO_NAME', 'qmk_fpm')
|
||||||
|
gh_ref = environ.get('GITHUB_REF', 'main')
|
||||||
|
gh_workflow_ids = environ.get('WORKFLOW_IDS', 'debian-buster-publish.yml,fedora-33-publish.yml,fedora-35-publish.yml,fedora-32-publish.yml,fedora-34-publish.yml,ubuntu-focal-publish.yml').split(',')
|
||||||
|
gh_api_url = environ.get('GITHUB_API_URL', 'https://api.github.com')
|
||||||
|
gh_workflow_args = {'ref': gh_ref}
|
||||||
|
gh_workflow_headers = {'Accept': 'application/vnd.github.v3+json'}
|
||||||
|
|
||||||
|
for gh_workflow_id in gh_workflow_ids:
|
||||||
|
gh_workflow_endpoint = f'{gh_api_url}/repos/{gh_repo_owner}/{gh_repo_name}/actions/workflows/{gh_workflow_id}/dispatches'
|
||||||
|
print(f'Triggering {gh_workflow_id} workflow at: {gh_workflow_endpoint}')
|
||||||
|
workflow_dispatch = requests.post(gh_workflow_endpoint, headers=gh_workflow_headers, json=gh_workflow_args, auth=(gh_user, gh_pat))
|
||||||
|
if workflow_dispatch.status_code != 204:
|
||||||
|
print(f'Error from GitHub API, status_code {workflow_dispatch.status_code}!')
|
||||||
|
print(workflow_dispatch.text)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
exit(0)
|
||||||
Reference in New Issue
Block a user