mirror of
https://gitea.com/actions/setup-java.git
synced 2026-10-02 21:25:25 +08:00
Prefer Zulu 4-segment hotfix builds when resolving version ranges (#1278)
Azul reports hotfix releases like 25.0.4.1 as java_version=[25,0,4,1] with openjdk_build_number=1 (SDKMAN '25.0.4+1.1'). Sorting candidates via semver.compareBuild ranked 25.0.4+7 above 25.0.4+1.1, so ranges such as '25' resolved to the older build. Compare java_version, build number and distro_version numerically instead. Fixes: #1275 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -277,6 +277,7 @@ describe('getVersionFromFileContent', () => {
|
||||
['java=17.0.9-graalce', '17.0.9', 'graalvm'],
|
||||
['java=11.0.25-librca', '11.0.25', 'liberica'],
|
||||
['java=25.0.4+1.1-librca', '25.0.4+1.1', 'liberica'],
|
||||
['java=25.0.4+1.1-zulu', '25.0.4+1.1', 'zulu'],
|
||||
['java=11.0.25-ms', '11.0.25', 'microsoft'],
|
||||
['java=21.0.5-oracle', '21.0.5', 'oracle'],
|
||||
['java=11.0.25-sapmchn', '11.0.25', 'sapmachine'],
|
||||
|
||||
Reference in New Issue
Block a user