aboutsummaryrefslogtreecommitdiff
path: root/bin/qmk
diff options
context:
space:
mode:
Diffstat (limited to 'bin/qmk')
-rwxr-xr-xbin/qmk12
1 files changed, 0 insertions, 12 deletions
diff --git a/bin/qmk b/bin/qmk
index 60555d3d7..7592eefd9 100755
--- a/bin/qmk
+++ b/bin/qmk
@@ -2,10 +2,8 @@
2"""CLI wrapper for running QMK commands. 2"""CLI wrapper for running QMK commands.
3""" 3"""
4import os 4import os
5import subprocess
6import sys 5import sys
7from importlib.util import find_spec 6from importlib.util import find_spec
8from time import strftime
9 7
10# Add the QMK python libs to our path 8# Add the QMK python libs to our path
11script_dir = os.path.dirname(os.path.realpath(__file__)) 9script_dir = os.path.dirname(os.path.realpath(__file__))
@@ -35,16 +33,6 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
35 print('Please run `pip3 install -r requirements.txt` to install the python dependencies.') 33 print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
36 exit(255) 34 exit(255)
37 35
38# Figure out our version
39# TODO(skullydazed/anyone): Find a method that doesn't involve git. This is slow in docker and on windows.
40command = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags']
41result = subprocess.run(command, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
42
43if result.returncode == 0:
44 os.environ['QMK_VERSION'] = result.stdout.strip()
45else:
46 os.environ['QMK_VERSION'] = 'nogit-' + strftime('%Y-%m-%d-%H:%M:%S') + '-dirty'
47
48# Setup the CLI 36# Setup the CLI
49import milc # noqa 37import milc # noqa
50 38