move task package from build.gradle to build.py

This commit is contained in:
ansgarz 2023-11-15 18:06:42 +01:00
parent 59163710af
commit 42c92915f8
2 changed files with 13 additions and 8 deletions

View file

@ -69,13 +69,7 @@ package:
<<: *kotlin
stage: package
script:
- ./gradlew -x assemble -x test jar
- ./gradlew -x assemble -x test -x jar uberjarDesktop
- ./gradlew -x assemble -x test -x jar uberjarServer
- ./gradlew -x assemble -x test -x jar uberjarSyspec
- cd build/libs/
- find . -type f -exec sha256sum {} \; | sort > sha256sum.lst
- find . -type f -exec sha512sum {} \; | sort > sha512sum.lst
- pyb package
artifacts:
paths:
- build/libs/*.jar

View file

@ -1,4 +1,3 @@
from os import environ
from subprocess import run
from pybuilder.core import init, task
from ddadevops import *
@ -59,11 +58,23 @@ 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)
@task
def package(project):
run("./gradlew -x test jar", shell=True)
run("./gradlew -x test uberjarDesktop", shell=True)
run("./gradlew -x test uberjarServer", shell=True)
run("./gradlew -x test uberjarSyspec", shell=True)
run("cd build/libs/ && find . -type f -exec sha256sum {} \; | sort > sha256sum.lst", shell=True)
run("cd build/libs/ && find . -type f -exec sha512sum {} \; | sort > sha512sum.lst", shell=True)
def release(project):
prepare(project)
tag(project)