Prepare release_mixin.py

This commit is contained in:
erik 2023-02-16 16:22:11 +01:00
parent e68ae46804
commit 22c5f6777e

View file

@ -5,10 +5,9 @@ from ddadevops import gopass_field_from_path, gopass_password_from_path
from version import Version 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': config.update({'ReleaseMixin':
{'release_type': release_type, {'commit_id': commit,
'commit': commit,
'file': file}}) 'file': file}})
return config return config
@ -18,25 +17,17 @@ class ReleaseMixin(DevopsBuild):
def __init__(self, project, config): def __init__(self, project, config):
super().__init__(project, config) super().__init__(project, config)
release_mixin_config = config['ReleaseMixin'] release_mixin_config = config['ReleaseMixin']
self.release_type = release_mixin_config['release_type4'] self.commit_id = release_mixin_config['commit_id']
self.commit = release_mixin_config['commit']
self.file = release_mixin_config['file'] self.file = release_mixin_config['file']
def read_commit_message(self): def init(self):
pass 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