From 2fe05b0e06342cea2af501e1c0755bde0d2f2506 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 22 Feb 2023 16:25:18 +0100 Subject: [PATCH] Use deep copy of release_version object Release version is modified again, when calling create_bump_version on it. --- release_mixin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release_mixin.py b/release_mixin.py index 85c63c7..48afeaf 100644 --- a/release_mixin.py +++ b/release_mixin.py @@ -1,3 +1,4 @@ +import copy from ddadevops import DevopsBuild from ddadevops import execute from ddadevops import gopass_field_from_path, gopass_password_from_path @@ -31,11 +32,13 @@ class ReleaseMixin(DevopsBuild): self.version_repo = VersionRepository(self.file) self.release_version = None self.bump_version = None + self.commit_string = None def init(self): init_service = InitReleaseService(self.version_repo) - self.release_version = init_service.create_release_version() - self.bump_version = self.release_version.create_bump_version() + self.release_version = init_service.create_release_version(self.commit_string) + release_version_copy = copy.deepcopy(self.release_version) # otherwise we'll modify the release_version again + self.bump_version = release_version_copy.create_bump_version() def prepare(self, version): git_repository = GitRepository()