Update build

This commit is contained in:
patdyn 2024-08-08 11:38:34 +02:00
parent fd8b1facb8
commit 74beafdcfe

View file

@ -23,7 +23,7 @@ def initialize(project):
"release_primary_build_file": "project.clj", "release_primary_build_file": "project.clj",
"release_secondary_build_files": [ "release_secondary_build_files": [
"package.json", "package.json",
], ],
"release_artifact_server_url": "https://repo.prod.meissa.de", "release_artifact_server_url": "https://repo.prod.meissa.de",
"release_organisation": "meissa", "release_organisation": "meissa",
"release_repository_name": name, "release_repository_name": name,
@ -100,6 +100,12 @@ def package_frontend(project):
@task @task
def package_uberjar(project): def package_uberjar(project):
run("mkdir -p target/uberjar", shell=True, check=True)
run(
"lein uberjar",
shell=True,
check=True,
)
run( run(
"sha256sum target/uberjar/c4k-keycloak-standalone.jar > target/uberjar/" + project.name + "-standalone.jar.sha256", "sha256sum target/uberjar/c4k-keycloak-standalone.jar > target/uberjar/" + project.name + "-standalone.jar.sha256",
shell=True, shell=True,
@ -126,13 +132,10 @@ def package_native(project):
"--no-server " + "--no-server " +
"--no-fallback " + "--no-fallback " +
"--features=clj_easy.graal_build_time.InitClojureClasses " + "--features=clj_easy.graal_build_time.InitClojureClasses " +
"-jar target/uberjar/" + project.name + "-standalone.jar " + f"-jar target/uberjar/{project.name}-standalone.jar " +
"-march=compatibility " +
"-H:+UnlockExperimentalVMOptions " +
"-H:IncludeResources=.*.yaml " + "-H:IncludeResources=.*.yaml " +
"-H:IncludeResources=logback.xml " +
"-H:Log=registerResource:verbose " + "-H:Log=registerResource:verbose " +
"-H:Name=target/graalvm/" + project.name + "", f"-H:Name=target/graalvm/{project.name}",
shell=True, shell=True,
check=True, check=True,
) )
@ -150,11 +153,7 @@ def package_native(project):
@task @task
def inst(project): def inst(project):
run( package_uberjar(project)
"lein uberjar",
shell=True,
check=True,
)
package_native(project) package_native(project)
run( run(
"sudo install -m=755 target/uberjar/" + project.name + "-standalone.jar /usr/local/bin/" + project.name + "-standalone.jar", "sudo install -m=755 target/uberjar/" + project.name + "-standalone.jar /usr/local/bin/" + project.name + "-standalone.jar",
@ -175,11 +174,6 @@ def upload_clj(project):
@task @task
def lint(project): def lint(project):
#run(
# "lein eastwood",
# shell=True,
# check=True,
#)
run( run(
"lein ancient check", "lein ancient check",
shell=True, shell=True,