From 2f5e023f9d2b3042d6e400c6ac3e7f53cc32c326 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 23 Jun 2023 10:48:53 +0200 Subject: [PATCH] Add build.py for releasing --- build.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build.py diff --git a/build.py b/build.py new file mode 100644 index 0000000..81bb3d3 --- /dev/null +++ b/build.py @@ -0,0 +1,36 @@ +from os import environ +from pybuilder.core import task, init +from ddadevops import * + +name = 'forgejo' +MODULE = 'c4k' +PROJECT_ROOT_PATH = '..' + +@init +def initialize(project): + project.build_depends_on("ddadevops>=4.0.0") + + input = { + "name": name, + "module": MODULE, + "stage": "notused", + "project_root_path": PROJECT_ROOT_PATH, + "build_types": [], + "mixin_types": ["RELEASE"], + "release_primary_build_file": "project.clj", + "release_secondary_build_files": ["package.json"], + } + + build = ReleaseMixin(project, input) + build.initialize_build_dir() + + +@task +def prepare_release(project): + build = get_devops_build(project) + build.prepare_release() + +@task +def after_publish(project): + build = get_devops_build(project) + build.tag_bump_and_push_release() \ No newline at end of file