From e68ae468040a19b99423cd8a2ed57e2be3579f57 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 16 Feb 2023 15:59:38 +0100 Subject: [PATCH] Prepare build.py --- build.py | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/build.py b/build.py index 183e28e..91d74dc 100644 --- a/build.py +++ b/build.py @@ -1,7 +1,13 @@ from pybuilder.core import task, init from ddadevops import * from version import * +from release_mixin import * +CONFIG_FILE = '' +COMMIT_ID = '' + +class MyBuild(ReleaseMixin): + pass def main(): init_project() @@ -9,23 +15,24 @@ def main(): @init def initialize(project): project.build_depends_on('ddadevops>=3.1.2') - # build = get_devops_build() - # build.init() - init_project() -@task -def release(project): - # build = get_devops_build(project) - # build.prepare_release() # mit config file - prepare_release() - # build() - # build.publish() - # build.release_in_git() - # release_in_git() + if COMMIT_ID == '': + COMMIT_ID = 'HEAD' + + config = create_release_mixin_config(CONFIG_FILE, COMMIT_ID) + + build = MyBuild(project, config) + + build.init() + @task -def build(project): +def prepare(project): build = get_devops_build(project) - # ToDo: Implement for project + build.prepare_release() -main() \ No newline at end of file +@task +def tag_and_push(project): + build = get_devops_build(project) + build.tag_and_push() +