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:
Bruno Borges
2026-10-02 00:07:25 -04:00
committed by GitHub
parent a78ec39f12
commit 74920aab4a
4 changed files with 117 additions and 26 deletions
+1
View File
@@ -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'],