1
0
Fork 0

qmk doctor: display qmk_firmware version tag (#16155)

This commit is contained in:
Ryan 2022-02-02 15:31:42 +11:00 committed by GitHub
parent 16ad8c0159
commit c9f88d7c67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -295,6 +295,14 @@ def git_get_branch():
return git_branch.stdout.strip()
def git_get_tag():
"""Returns the current tag for a repo, or None.
"""
git_tag = cli.run(['git', 'describe', '--abbrev=0', '--tags'])
if git_tag.returncode == 0:
return git_tag.stdout.strip()
def git_is_dirty():
"""Returns 1 if repo is dirty, or 0 if clean
"""