From 22c5f6777e7750a62bfea7cde14f7f3d143733b7 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 16 Feb 2023 16:22:11 +0100 Subject: [PATCH] Prepare release_mixin.py --- release_mixin.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/release_mixin.py b/release_mixin.py index 6d709f7..f83a49f 100644 --- a/release_mixin.py +++ b/release_mixin.py @@ -5,10 +5,9 @@ from ddadevops import gopass_field_from_path, gopass_password_from_path from version import Version -def add_release_mixin_config(config, release_type, commit, file): +def create_release_mixin_config(config, release_type, commit, file): config.update({'ReleaseMixin': - {'release_type': release_type, - 'commit': commit, + {'commit_id': commit, 'file': file}}) return config @@ -17,26 +16,18 @@ class ReleaseMixin(DevopsBuild): def __init__(self, project, config): super().__init__(project, config) - release_mixin_config = config['ReleaseMixin'] - self.release_type = release_mixin_config['release_type4'] - self.commit = release_mixin_config['commit'] + release_mixin_config = config['ReleaseMixin'] + self.commit_id = release_mixin_config['commit_id'] self.file = release_mixin_config['file'] - def read_commit_message(self): - pass + def init(self): + release_and_bump_version = InitReleaseService(self.commit_id, self.file).get_version() + return release_and_bump_version - def calculate_release_type(self): - pass - def get_version(self): - return Version.from_file(self.file) - def create_release_version(self): - pass - - def create_bump_version(self): - pass +