dda-devops-build/services.py
erik 88c3acb73c WIP Create version repo in services with classmethod
The goal is to create a single version_repo object for each
file loaded. In that way we may avoid loading the file for loading
and writing.
2023-02-20 13:33:28 +01:00

40 lines
969 B
Python

class InitReleaseService():
def __init__(self, commit_id, file):
self.commit_id = commit_id
self.file = file
self.version_repo = none
def __read_commit_message(self):
pass
def __calculate_release_type(self):
pass
def get_version(self):
version_repo = VersionRepository.get_current_version(self.file)
commit_message = self.read_commit_message(self.commit_id)
release_type = self.calculate_release_type(commit_message)
release_version = create_release_version(version_repo.version ,release_type)
bump_version = create_bump_version(version_repo.version,release_type)
release_and_bump_version = tuple(release_version, bump_version)
return release_and_bump_version
def create_release_version(self):
pass
def create_bump_version(self):
pass
class PrepareReleaseService():
pass
class TagAndPushReleaseService():
pass