Implement tag_annotated and bugfix

This commit is contained in:
erik 2023-02-22 14:10:53 +01:00
parent 03f8507968
commit a07c23434e

View file

@ -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)