mirror of
https://gh-proxy.com/github.com/actions/setup-java.git
synced 2026-10-06 04:26:04 +08:00
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:
co-authored by
Copilot App
parent
d0e6e4dbf7
commit
ca21d6d9c1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user