Skip to content

Commit 6603ffd

Browse files
committed
adjustments to local build scripts [ci skip]
1 parent be05f6d commit 6603ffd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build_win.ps1

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ if(-not $env:JAVA_HOME) {
1414
}
1515

1616
# Check Java version
17-
$minJavaVersion=$(mvn help:evaluate "-Dexpression=jdk.version" -q -DforceStdout)
17+
$minJavaVersion=[int]$(mvn help:evaluate "-Dexpression=jdk.version" -q -DforceStdout)
1818
$javaVersion = $(& "$env:JAVA_HOME\bin\java" --version) -split ' ' | Select-Object -Index 1
19-
if( ($javaVersion.Split('.') | Select-Object -First 1) -ne "22") {
19+
if( ([int] ($javaVersion.Split('.') | Select-Object -First 1)) -lt $minJavaVersion) {
2020
throw "Java version $javaVersion is too old. Minimum required version is $minJavaVersion"
2121
}
2222

@@ -42,7 +42,6 @@ Get-Content -Path './dist/jpackage.args' | ForEach-Object {
4242
} | Out-File -FilePath './target/jpackage.args'
4343

4444
# jpackage
45-
# app-version is hard coded, since the script is only for local test builds
4645
Write-Host "Creating app binary with jpackage..."
4746
& $env:JAVA_HOME/bin/jpackage `@./target/jpackage.args --win-console
4847

0 commit comments

Comments
 (0)