Implement release type calculation
This commit is contained in:
parent
33fdf3073a
commit
f94d1879dc
1 changed files with 5 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
||||||
from version_repository import VersionRepository
|
from version_repository import VersionRepository
|
||||||
from release_type import ReleaseType
|
from release_type import ReleaseType
|
||||||
|
from git_repository import GitRepository
|
||||||
|
|
||||||
class InitReleaseService():
|
class InitReleaseService():
|
||||||
|
|
||||||
|
@ -8,11 +9,8 @@ class InitReleaseService():
|
||||||
self.file = file
|
self.file = file
|
||||||
self.version_repo = None
|
self.version_repo = None
|
||||||
|
|
||||||
def __read_commit_message(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def __calculate_release_type(self):
|
def __calculate_release_type(self):
|
||||||
pass
|
return GitRepository().get_release_type_from_latest_commit()
|
||||||
|
|
||||||
def get_version(self, release_type):
|
def get_version(self, release_type):
|
||||||
self.version_repo = VersionRepository(self.file)
|
self.version_repo = VersionRepository(self.file)
|
||||||
|
@ -20,7 +18,7 @@ class InitReleaseService():
|
||||||
|
|
||||||
def create_release_version(self):
|
def create_release_version(self):
|
||||||
commit_message = self.read_commit_message(self.commit_id)
|
commit_message = self.read_commit_message(self.commit_id)
|
||||||
release_type = self.calculate_release_type(commit_message)
|
release_type = self.__calculate_release_type(commit_message)
|
||||||
version = self.get_version(release_type).create_release_version()
|
version = self.get_version(release_type).create_release_version()
|
||||||
|
|
||||||
self.version_repo.write_file(version.get_version_string())
|
self.version_repo.write_file(version.get_version_string())
|
||||||
|
|
Loading…
Reference in a new issue