Support Java release tags with exact abbreviated builds

Normalize jdk-prefixed numeric versions and pad abbreviated build requests so exact build constraints survive version matching. Keep platform and package validation consistent, document the syntax, and add regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Bruno Borges
2026-10-05 18:06:14 +02:00
co-authored by Copilot App
parent d0e6e4dbf7
commit ca21d6d9c1
12 changed files with 250 additions and 94 deletions
+18
View File
@@ -102,6 +102,24 @@ describe('Java platform capabilities', () => {
}
);
it.each(['jdk-27+35', '27+35', 'jdk-27-ea.35'])(
'enforces version-dependent architecture restrictions for %s',
version => {
expect(() =>
validateJavaPlatform('corretto', 'linux', 'x86', version)
).toThrow(/x86 \(<12\)/);
}
);
it.each(['jdk-11+9', '11+9', 'jdk-11-ea.9'])(
'accepts compatible numeric release tags: %s',
version => {
expect(validateJavaPlatform('corretto', 'linux', 'x86', version)).toBe(
'x86'
);
}
);
it('allows local archives on any platform and architecture', () => {
expect(validateJavaPlatform('jdkfile', 'aix', 'mips64', '21')).toBe(
'mips64'