diff options
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 | """ |