added getCurrentTag to git wrapper

master 3.7.2.2
idziubenko 2 years ago
parent 671f318e75
commit 77cb1a713a

@ -835,6 +835,18 @@ class Git():
return [x.strip() for x in git_tag if x.strip()]
return []
def getCurrentTag(self, rpath):
"""
Получить выбранный в данный момент тэг
"""
git_dir = self._gitDir(rpath)
git_tag = self.process(self._git, "--git-dir", git_dir, "--work-tree",
rpath,
"describe", "--tags", stderr=STDOUT)
if git_tag.success():
return git_tag.read().strip()
return ""
def checkoutBranch(self, rpath, branch):
"""
Сменить ветку

Loading…
Cancel
Save