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 5a01943773..90a68ca3cd 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -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      """ | 
