from os import environ from pybuilder.core import task, init from ddadevops import * name = "buildtest" MODULE = "release" PROJECT_ROOT_PATH = "." @init def initialize(project): input = { "name": name, "module": MODULE, "stage": "notused", "project_root_path": PROJECT_ROOT_PATH, "build_types": [], "mixin_types": ["RELEASE"], "release_primary_build_file": "build_to_test.py", "release_secondary_build_files": ["package.json", "project.clj"], } project.build_depends_on("ddadevops>=4.0.0-dev") build = ReleaseMixin(project, input) build.initialize_build_dir() @task def patch(project): build(project, "PATCH") @task def minor(project): build(project, "MINOR") @task def major(project): build(project, "MAJOR") @task def dev(project): build(project, "NONE") @task def nothing(project): pass @task def prepare_release(project): build = get_devops_build(project) build.prepare_release() @task def tag_bump_and_push_release(project): build = get_devops_build(project) build.tag_bump_and_push_release() def build(project, release_type): build = get_devops_build(project) build.update_release_type(release_type) nothing(project)