add guard to ensure pom defined jfx version matches the jdk bundled/jmod one

This commit is contained in:
Armin Schrenk
2022-12-05 16:10:39 +01:00
parent ba7029968d
commit 3641b34c2d
4 changed files with 44 additions and 0 deletions
+9
View File
@@ -39,6 +39,15 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
java-package: 'jdk+fx'
cache: ${{ env.JAVA_CACHE }}
- name: Ensure major jfx version in pom equals in jdk
shell: pwsh
run: |
$jfxPomVersion = (&mvn help:evaluate -Dexpression=javafx.version -q -DforceStdout) -split "\."
$jfxJdkVersion = (Get-Content -path "${env:JAVA_HOME}/lib/javafx.properties" | Where-Object {$_ -like 'javafx.version=*' }) -replace '.*=',''
if ($jfxPomVersion[0] -ne $jfxJdkVersion) {
Out-Error "Major part of JavaFX version in pom($($jfxPomVersion[0])) does not match the version in JDK(${jfxJdkVersion}) "
exit 1
}
- name: Set version
run : mvn versions:set -DnewVersion=${{ needs.get-version.outputs.semVerStr }}
- name: Run maven