Use deep copy of release_version object
Release version is modified again, when calling create_bump_version on it.
This commit is contained in:
parent
fa73c52fe2
commit
2fe05b0e06
1 changed files with 5 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue