mirror of
https://github.com/actions/setup-java.git
synced 2025-11-20 07:57:47 +00:00
Merge remote-tracking branch 'origin/main' into fix/graalvm-api-rate-limit
This commit is contained in:
commit
cc4f61c67d
12 changed files with 40 additions and 34 deletions
|
|
@ -59,9 +59,8 @@ export async function createToolchainsSettings({
|
|||
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
||||
// otherwise use the home/.m2/ path
|
||||
await io.mkdirP(settingsDirectory);
|
||||
const originalToolchains = await readExistingToolchainsFile(
|
||||
settingsDirectory
|
||||
);
|
||||
const originalToolchains =
|
||||
await readExistingToolchainsFile(settingsDirectory);
|
||||
const updatedToolchains = generateToolchainDefinition(
|
||||
originalToolchains,
|
||||
jdkInfo.version,
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export function getVersionFromFileContent(
|
|||
const versionFileName = getFileName(versionFile);
|
||||
if (versionFileName == '.tool-versions') {
|
||||
javaVersionRegExp =
|
||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
||||
/^java\s+(?:\S*-)?(?<version>\d+(?:\.\d+)*([+_.-](?:openj9[-._]?\d[\w.-]*|java\d+|jre[-_\w]*|OpenJDK\d+[\w_.-]*|[a-z0-9]+))*)/im;
|
||||
} else {
|
||||
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue