diff options
| author | QMK Bot <[email protected]> | 2022-02-02 04:31:44 +0000 | 
|---|---|---|
| committer | QMK Bot <[email protected]> | 2022-02-02 04:31:44 +0000 | 
| commit | 7d38aec3ac754c544489f1c1a956dcd49d9a3410 (patch) | |
| tree | 94dfd53adc5f79990fe12ba7143b5c95858d7c92 /lib/python/qmk/commands.py | |
| parent | 6e2b03cf6901a6bbd146c074e8e9d9160358c6d9 (diff) | |
| parent | c9f88d7c67e00b3689fd4afd7630bc7fcd5b7ed4 (diff) | |
| download | qmk_firmware-7d38aec3ac754c544489f1c1a956dcd49d9a3410.tar.gz qmk_firmware-7d38aec3ac754c544489f1c1a956dcd49d9a3410.zip | |
Merge remote-tracking branch 'origin/master' into develop
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      """ | 
