|
|
@ -1,18 +1,25 @@
|
|
|
|
from typing import List
|
|
|
|
from typing import List
|
|
|
|
from pathlib import Path
|
|
|
|
from pathlib import Path
|
|
|
|
from ..infrastructure import GitApi, BuildFileRepository
|
|
|
|
from ..infrastructure import GitApi, ArtifactDeploymentApi, BuildFileRepository
|
|
|
|
from ..domain import Version, Release, ReleaseType
|
|
|
|
from ..domain import Version, Release, ReleaseType
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ReleaseService:
|
|
|
|
class ReleaseService:
|
|
|
|
def __init__(self, git_api: GitApi, build_file_repository: BuildFileRepository):
|
|
|
|
def __init__(
|
|
|
|
|
|
|
|
self,
|
|
|
|
|
|
|
|
git_api: GitApi,
|
|
|
|
|
|
|
|
build_file_repository: BuildFileRepository,
|
|
|
|
|
|
|
|
artifact_deployment_api: ArtifactDeploymentApi,
|
|
|
|
|
|
|
|
):
|
|
|
|
self.git_api = git_api
|
|
|
|
self.git_api = git_api
|
|
|
|
|
|
|
|
self.artifact_deployment_api = artifact_deployment_api
|
|
|
|
self.build_file_repository = build_file_repository
|
|
|
|
self.build_file_repository = build_file_repository
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
@classmethod
|
|
|
|
def prod(cls, base_dir: str):
|
|
|
|
def prod(cls, base_dir: str):
|
|
|
|
return cls(
|
|
|
|
return cls(
|
|
|
|
GitApi(),
|
|
|
|
GitApi(),
|
|
|
|
|
|
|
|
ArtifactDeploymentApi(),
|
|
|
|
BuildFileRepository(base_dir),
|
|
|
|
BuildFileRepository(base_dir),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|