Implement creation of release version
This commit is contained in:
parent
91f3d7d972
commit
eb998cfdbb
2 changed files with 15 additions and 14 deletions
27
services.py
27
services.py
|
@ -3,7 +3,7 @@ class InitReleaseService():
|
|||
def __init__(self, commit_id, file):
|
||||
self.commit_id = commit_id
|
||||
self.file = file
|
||||
self.version_repo = none
|
||||
self.version_repo = None
|
||||
|
||||
def __read_commit_message(self):
|
||||
pass
|
||||
|
@ -11,23 +11,24 @@ class InitReleaseService():
|
|||
def __calculate_release_type(self):
|
||||
pass
|
||||
|
||||
def get_version(self):
|
||||
def get_version_repo(self):
|
||||
self.version_repo = VersionRepository.get(self.file)
|
||||
|
||||
version_repo = VersionRepository.get(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_list, release_type)
|
||||
bump_version = create_bump_version(version_repo.version_list, release_type)
|
||||
|
||||
release_and_bump_version = tuple(release_version, bump_version)
|
||||
|
||||
return release_and_bump_version
|
||||
def get_version_list(self):
|
||||
self.get_version_repo()
|
||||
return self.version_repo.version_list
|
||||
|
||||
def create_release_version(self):
|
||||
pass
|
||||
commit_message = self.read_commit_message(self.commit_id)
|
||||
release_type = self.calculate_release_type(commit_message)
|
||||
version_list = self.get_version_list()
|
||||
|
||||
release_version = Version.create_release_version(version_list, release_type)
|
||||
self.version_repo.write_file(release_version.get_version_string())
|
||||
|
||||
|
||||
def create_bump_version(self):
|
||||
bump_version = create_bump_version(version_repo.version_list, release_type)
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ class Version():
|
|||
|
||||
def __init__(self, version_list, release_type):
|
||||
self.version_list = None
|
||||
self.is_snapshot = None
|
||||
self.version_string = None
|
||||
self.is_snapshot = None
|
||||
|
||||
def increment(self, release_type: ReleaseType):
|
||||
self.is_snapshot = False
|
||||
|
|
Loading…
Reference in a new issue