Skip to content

Commit

Permalink
adjustments to local build scripts [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Nov 21, 2024
1 parent be05f6d commit 6603ffd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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

Expand Down

0 comments on commit 6603ffd

Please sign in to comment.