update build
This commit is contained in:
parent
5d9233675c
commit
00972e65f3
1 changed files with 20 additions and 18 deletions
36
build.py
36
build.py
|
@ -32,47 +32,39 @@ def initialize(project):
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def patch(project):
|
def patch(project):
|
||||||
build(project, "PATCH")
|
linttest(project, "PATCH")
|
||||||
|
release(project)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def minor(project):
|
def minor(project):
|
||||||
build(project, "MINOR")
|
linttest(project, "MINOR")
|
||||||
|
release(project)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def major(project):
|
def major(project):
|
||||||
build(project, "MAJOR")
|
linttest(project, "MAJOR")
|
||||||
|
release(project)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def dev(project):
|
def dev(project):
|
||||||
build(project, "NONE")
|
linttest(project, "NONE")
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def nothing(project):
|
def prepare(project):
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@task
|
|
||||||
def prepare_release(project):
|
|
||||||
build = get_devops_build(project)
|
build = get_devops_build(project)
|
||||||
build.prepare_release()
|
build.prepare_release()
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def tag_bump_and_push_release(project):
|
def tag(project):
|
||||||
build = get_devops_build(project)
|
build = get_devops_build(project)
|
||||||
build.tag_bump_and_push_release()
|
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
|
@task
|
||||||
def publish_artifacts(project):
|
def publish_artifacts(project):
|
||||||
build = get_devops_build(project)
|
build = get_devops_build(project)
|
||||||
|
@ -80,3 +72,13 @@ def publish_artifacts(project):
|
||||||
print("RELEASE_ARTIFACT_TOKEN" in environ)
|
print("RELEASE_ARTIFACT_TOKEN" in environ)
|
||||||
print(environ.get("RELEASE_ARTIFACT_TOKEN"))
|
print(environ.get("RELEASE_ARTIFACT_TOKEN"))
|
||||||
build.publish_artifacts()
|
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)
|
||||||
|
|
Loading…
Reference in a new issue