diff --git a/pym/calculate/lib/utils/git.py b/pym/calculate/lib/utils/git.py index bea3e61..7f36bf7 100644 --- a/pym/calculate/lib/utils/git.py +++ b/pym/calculate/lib/utils/git.py @@ -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): """ Сменить ветку