Add commit info to version.h
(#19542)
* Initial commit * Fix import order * Fix deleted code instead of debug print line * Format * Update lib/python/qmk/cli/generate/version_h.py Co-authored-by: Ryan <fauxpark@gmail.com> * Renaming * Update lib/python/qmk/cli/generate/version_h.py Co-authored-by: Joel Challis <git@zvecr.com> * Update lib/python/qmk/git.py Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
53132ab9cf
commit
d55b07696b
2 changed files with 18 additions and 3 deletions
|
@ -136,3 +136,11 @@ def git_get_ignored_files(check_dir='.'):
|
|||
if invalid.returncode != 0:
|
||||
return []
|
||||
return invalid.stdout.strip().splitlines()
|
||||
|
||||
|
||||
def git_get_qmk_hash():
|
||||
output = cli.run(['git', 'rev-parse', '--short', 'HEAD'])
|
||||
if output.returncode != 0:
|
||||
return None
|
||||
|
||||
return output.stdout.strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue