From a07c23434e506e20634e9723a5ceb3f8cb049b35 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 22 Feb 2023 14:10:53 +0100 Subject: [PATCH] Implement tag_annotated and bugfix --- git_repository.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git_repository.py b/git_repository.py index f891646..0622e9f 100644 --- a/git_repository.py +++ b/git_repository.py @@ -17,7 +17,8 @@ class GitRepository(): return inst def get_latest_commit(self): - self.latest_commit = self.system_repository.run_checked('git', 'log', '--oneline', '--format="%s %b"', '-n' + '1') + self.system_repository.run_checked('git', 'log', '--oneline', '--format="%s %b"', '-n' + '1') + self.latest_commit = self.system_repository.stdout def get_release_type_from_latest_commit(self): if self.latest_commit is None: @@ -34,6 +35,9 @@ class GitRepository(): else: return None + def tag_annotated(self, annotation: str, message: str): + self.system_repository.run_checked('git', 'tag', '-a', annotation, '-m', message) + def get_current_branch(self): self.system_repository.run_checked('git', 'branch', '--show-current') @@ -48,4 +52,3 @@ class GitRepository(): def checkout(self, branch: str): self.system_repository.run_checked('git', 'checkout', branch) -