master #3

Merged
zwa merged 4 commits from master into refactor-git-trust 2023-08-15 19:39:39 +00:00
2 changed files with 73 additions and 2 deletions
Showing only changes of commit c1267ac17e - Show all commits

View file

@ -32,8 +32,7 @@ build:
<<: *kotlin <<: *kotlin
stage: build stage: build
script: script:
- echo "---------- build stage ----------" - pyb build
- ./gradlew assemble
artifacts: artifacts:
paths: paths:
- build/libs/*.jar - build/libs/*.jar

72
build.py Normal file
View file

@ -0,0 +1,72 @@
from os import environ
from subprocess import run
from pybuilder.core import init, task
from ddadevops import *
default_task = "dev"
name = "provs"
PROJECT_ROOT_PATH = "."
@init
def initialize(project):
input = {
"name": name,
"module": "notused",
"stage": "notused",
"project_root_path": PROJECT_ROOT_PATH,
"build_types": [],
"mixin_types": ["RELEASE"],
"release_primary_build_file": "build.gradle",
"release_secondary_build_files": [],
}
build = ReleaseMixin(project, input)
build.initialize_build_dir()
@task
def patch(project):
linttest(project, "PATCH")
release(project)
@task
def minor(project):
linttest(project, "MINOR")
release(project)
@task
def major(project):
linttest(project, "MAJOR")
release(project)
@task
def dev(project):
linttest(project, "NONE")
@task
def prepare(project):
build = get_devops_build(project)
build.prepare_release()
@task
def tag(project):
build = get_devops_build(project)
build.tag_bump_and_push_release()
@task
def build(project):
print("---------- build stage ----------")
run("./gradlew assemble", shell=True)
def release(project):
prepare(project)
tag(project)
def linttest(project, release_type):
build(project)