def METHOD_NAME(self):
    cmd = ["git", "describe", "--tags", "--abbrev=0"]
    git_tag = check_output(cmd, cwd=self.workdir, encoding="utf-8").strip()
    cmd = ["git", "describe", "--tags"]
    desc = check_output(cmd, cwd=self.workdir, encoding="utf-8").strip()
    if desc == git_tag:
        # we're at the latest git tag
        git_commits = 0
        git_hash = None
    else:
        # there are additional commits on top of the latest tag
        _, git_commits, git_hash = desc.rsplit("-", 2)
        git_commits = int(git_commits)
        git_hash = git_hash[1:]
    return git_tag, git_commits, git_hash