WIP Implement prepare and tagandpush services
This commit is contained in:
parent
821e06f82a
commit
1112b1ad49
2 changed files with 21 additions and 6 deletions
9
build.py
9
build.py
|
@ -21,9 +21,14 @@ def initialize(project):
|
||||||
|
|
||||||
config = create_release_mixin_config(CONFIG_FILE, COMMIT_ID)
|
config = create_release_mixin_config(CONFIG_FILE, COMMIT_ID)
|
||||||
|
|
||||||
build = MyBuild(project, config)
|
|
||||||
|
|
||||||
build.init()
|
build = MyBuild(project, config)
|
||||||
|
release_version, bump_version = build.init()
|
||||||
|
build.prepare()
|
||||||
|
build.tag_and_push()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
|
|
|
@ -3,6 +3,7 @@ from ddadevops import DevopsBuild
|
||||||
from ddadevops import execute
|
from ddadevops import execute
|
||||||
from ddadevops import gopass_field_from_path, gopass_password_from_path
|
from ddadevops import gopass_field_from_path, gopass_password_from_path
|
||||||
from version import Version
|
from version import Version
|
||||||
|
from version_repository import VersionRepository
|
||||||
|
|
||||||
|
|
||||||
def create_release_mixin_config(config, release_type, commit, file):
|
def create_release_mixin_config(config, release_type, commit, file):
|
||||||
|
@ -17,13 +18,22 @@ class ReleaseMixin(DevopsBuild):
|
||||||
def __init__(self, project, config):
|
def __init__(self, project, config):
|
||||||
super().__init__(project, config)
|
super().__init__(project, config)
|
||||||
release_mixin_config = config['ReleaseMixin']
|
release_mixin_config = config['ReleaseMixin']
|
||||||
self.commit_id = release_mixin_config['commit_id']
|
|
||||||
self.file = release_mixin_config['file']
|
self.file = release_mixin_config['file']
|
||||||
|
self.version_repo = VersionRepository(self.file)
|
||||||
|
|
||||||
def init(self):
|
def init(self): # returns versions
|
||||||
release_and_bump_version = InitReleaseService(self.commit_id, self.file).get_version()
|
release_and_bump_version = InitReleaseService(self.version_repo).get_version()
|
||||||
return release_and_bump_version
|
return release_and_bump_version
|
||||||
|
|
||||||
|
def prepare(self, version: Version): # writes into files, add. commit
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tag_and_push(): # correct tag and do push
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue