diff options
author | Ryan <fauxpark@gmail.com> | 2022-02-02 15:31:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 20:31:42 -0800 |
commit | c9f88d7c67e00b3689fd4afd7630bc7fcd5b7ed4 (patch) | |
tree | 1d6e8eb51b87d8af9829c331a925c9a7f60d2205 /lib/python/qmk/commands.py | |
parent | 16ad8c0159383b0ecee7c97119e3d61f1038f56a (diff) | |
download | qmk_firmware-c9f88d7c67e00b3689fd4afd7630bc7fcd5b7ed4.tar.gz qmk_firmware-c9f88d7c67e00b3689fd4afd7630bc7fcd5b7ed4.zip |
`qmk doctor`: display qmk_firmware version tag (#16155)
Diffstat (limited to 'lib/python/qmk/commands.py')
-rw-r--r-- | lib/python/qmk/commands.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 5a0194377..90a68ca3c 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py | |||
@@ -295,6 +295,14 @@ def git_get_branch(): | |||
295 | return git_branch.stdout.strip() | 295 | return git_branch.stdout.strip() |
296 | 296 | ||
297 | 297 | ||
298 | def git_get_tag(): | ||
299 | """Returns the current tag for a repo, or None. | ||
300 | """ | ||
301 | git_tag = cli.run(['git', 'describe', '--abbrev=0', '--tags']) | ||
302 | if git_tag.returncode == 0: | ||
303 | return git_tag.stdout.strip() | ||
304 | |||
305 | |||
298 | def git_is_dirty(): | 306 | def git_is_dirty(): |
299 | """Returns 1 if repo is dirty, or 0 if clean | 307 | """Returns 1 if repo is dirty, or 0 if clean |
300 | """ | 308 | """ |