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)