2023-02-16 15:55:01 +00:00
|
|
|
class InitReleaseService():
|
|
|
|
|
|
|
|
def __init__(self, commit_id, file):
|
|
|
|
self.commit_id = commit_id
|
|
|
|
self.file = file
|
2023-02-20 12:33:28 +00:00
|
|
|
self.version_repo = none
|
2023-02-16 15:55:01 +00:00
|
|
|
|
|
|
|
def __read_commit_message(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def __calculate_release_type(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def get_version(self):
|
|
|
|
|
2023-02-20 12:47:14 +00:00
|
|
|
version_repo = VersionRepository.get(self.file)
|
2023-02-16 15:55:01 +00:00
|
|
|
commit_message = self.read_commit_message(self.commit_id)
|
|
|
|
release_type = self.calculate_release_type(commit_message)
|
|
|
|
|
2023-02-20 12:47:14 +00:00
|
|
|
release_version = create_release_version(version_repo.version_list, release_type)
|
|
|
|
bump_version = create_bump_version(version_repo.version_list, release_type)
|
2023-02-16 15:55:01 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|