From c9f88d7c67e00b3689fd4afd7630bc7fcd5b7ed4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 2 Feb 2022 15:31:42 +1100 Subject: `qmk doctor`: display qmk_firmware version tag (#16155) --- lib/python/qmk/commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/python/qmk/commands.py') 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 """ -- cgit v1.2.3