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 13:45:15 +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
|
|
|
|
|
2023-02-20 13:45:15 +00:00
|
|
|
def get_version_repo(self):
|
|
|
|
self.version_repo = VersionRepository.get(self.file)
|
2023-02-16 15:55:01 +00:00
|
|
|
|
2023-02-20 13:45:15 +00:00
|
|
|
def get_version_list(self):
|
|
|
|
self.get_version_repo()
|
|
|
|
return self.version_repo.version_list
|
|
|
|
|
|
|
|
def create_release_version(self):
|
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 13:45:15 +00:00
|
|
|
version_list = self.get_version_list()
|
2023-02-16 15:55:01 +00:00
|
|
|
|
2023-02-20 13:45:15 +00:00
|
|
|
release_version = Version.create_release_version(version_list, release_type)
|
|
|
|
self.version_repo.write_file(release_version.get_version_string())
|
2023-02-16 15:55:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
def create_bump_version(self):
|
2023-02-20 13:45:15 +00:00
|
|
|
bump_version = create_bump_version(version_repo.version_list, release_type)
|
2023-02-16 15:55:01 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PrepareReleaseService():
|
|
|
|
pass
|
|
|
|
|
|
|
|
class TagAndPushReleaseService():
|
|
|
|
pass
|
|
|
|
|