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
|
||||
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)
|
||||
|
@ -80,3 +72,13 @@ def publish_artifacts(project):
|
|||
print("RELEASE_ARTIFACT_TOKEN" in environ)
|
||||
print(environ.get("RELEASE_ARTIFACT_TOKEN"))
|
||||
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