From 00972e65f3d0d085a91bcf5f2e72a4298eb9fca9 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Thu, 17 Aug 2023 09:26:58 +0200 Subject: [PATCH] update build --- build.py | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/build.py b/build.py index bd5869e..0e4a58c 100644 --- a/build.py +++ b/build.py @@ -32,51 +32,53 @@ def initialize(project): @task def patch(project): - build(project, "PATCH") + linttest(project, "PATCH") + release(project) @task def minor(project): - build(project, "MINOR") + linttest(project, "MINOR") + release(project) @task def major(project): - build(project, "MAJOR") + linttest(project, "MAJOR") + release(project) @task def dev(project): - build(project, "NONE") + linttest(project, "NONE") @task -def nothing(project): - pass - - -@task -def prepare_release(project): +def prepare(project): build = get_devops_build(project) build.prepare_release() @task -def tag_bump_and_push_release(project): +def tag(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) - - @task def publish_artifacts(project): build = get_devops_build(project) print("one more test") print("RELEASE_ARTIFACT_TOKEN" in environ) print(environ.get("RELEASE_ARTIFACT_TOKEN")) - build.publish_artifacts() \ No newline at end of file + build.publish_artifacts() + + +def release(project): + prepare(project) + tag(project) + + +def linttest(project, release_type): + build = get_devops_build(project) + build.update_release_type(release_type)