From 9c9676b5b84303a0809faa6a77735c4a0d040205 Mon Sep 17 00:00:00 2001 From: bom Date: Thu, 2 Mar 2023 15:04:30 +0100 Subject: [PATCH] Pass Release instead of Version object --- release_mixin.py | 2 +- services.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release_mixin.py b/release_mixin.py index 39b9ab7..05f97da 100644 --- a/release_mixin.py +++ b/release_mixin.py @@ -40,4 +40,4 @@ class ReleaseMixin(DevopsBuild): def tag_and_push_release(self): tag_and_push_release_service = TagAndPushReleaseService(self.git_api) - tag_and_push_release_service.tag_and_push_release(self.release_version) + tag_and_push_release_service.tag_and_push_release(self.release_repo.get_release()) diff --git a/services.py b/services.py index 741e3e1..296bf98 100644 --- a/services.py +++ b/services.py @@ -1,6 +1,6 @@ from pathlib import Path from infrastructure import VersionRepository, ReleaseRepository, GitApi -from domain import Version, ReleaseType +from domain import Version, ReleaseType, Release class PrepareReleaseService(): @@ -28,8 +28,8 @@ class TagAndPushReleaseService(): def __init__(self, git_api: GitApi): self.git_api = git_api - def tag_and_push_release(self, release_version: Version): - annotation = 'v' + release_version.get_version_string() + def tag_and_push_release(self, release: Release): + annotation = 'v' + release.version.get_version_string() message = 'Release ' + annotation self.git_api.tag_annotated(annotation, message, 1) # self.git_api.push()