From 6603ffd14a2be276579eeca6b9bfb805cfa49f1b Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 21 Nov 2024 17:16:35 +0100 Subject: [PATCH] adjustments to local build scripts [ci skip] --- build_win.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_win.ps1 b/build_win.ps1 index 6ee9772..bfdc144 100644 --- a/build_win.ps1 +++ b/build_win.ps1 @@ -14,9 +14,9 @@ if(-not $env:JAVA_HOME) { } # Check Java version -$minJavaVersion=$(mvn help:evaluate "-Dexpression=jdk.version" -q -DforceStdout) +$minJavaVersion=[int]$(mvn help:evaluate "-Dexpression=jdk.version" -q -DforceStdout) $javaVersion = $(& "$env:JAVA_HOME\bin\java" --version) -split ' ' | Select-Object -Index 1 -if( ($javaVersion.Split('.') | Select-Object -First 1) -ne "22") { +if( ([int] ($javaVersion.Split('.') | Select-Object -First 1)) -lt $minJavaVersion) { throw "Java version $javaVersion is too old. Minimum required version is $minJavaVersion" } @@ -42,7 +42,6 @@ Get-Content -Path './dist/jpackage.args' | ForEach-Object { } | Out-File -FilePath './target/jpackage.args' # jpackage -# app-version is hard coded, since the script is only for local test builds Write-Host "Creating app binary with jpackage..." & $env:JAVA_HOME/bin/jpackage `@./target/jpackage.args --win-console