mirror of
https://github.com/actions/setup-java.git
synced 2025-04-06 03:50:13 +08:00
Merge cb386ac736070eed0ab3ad0e944d3b96095cbcc0 into 3b6c050358614dd082e53cdbc55580431fc4e437
This commit is contained in:
commit
0b69ba0d13
2
dist/cleanup/index.js
vendored
2
dist/cleanup/index.js
vendored
@ -94229,7 +94229,7 @@ function getVersionFromFileContent(content, distributionName, versionFile) {
|
|||||||
const versionFileName = getFileName(versionFile);
|
const versionFileName = getFileName(versionFile);
|
||||||
if (versionFileName == '.tool-versions') {
|
if (versionFileName == '.tool-versions') {
|
||||||
javaVersionRegExp =
|
javaVersionRegExp =
|
||||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\S+)?(\.\d+)?(-ea(\.\d+)?)?(\.LTS)?)$/m;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
||||||
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
@ -132234,7 +132234,7 @@ function getVersionFromFileContent(content, distributionName, versionFile) {
|
|||||||
const versionFileName = getFileName(versionFile);
|
const versionFileName = getFileName(versionFile);
|
||||||
if (versionFileName == '.tool-versions') {
|
if (versionFileName == '.tool-versions') {
|
||||||
javaVersionRegExp =
|
javaVersionRegExp =
|
||||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\S+)?(\.\d+)?(-ea(\.\d+)?)?(\.LTS)?)$/m;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
||||||
|
@ -614,5 +614,6 @@ major versions: 8, 11, 16, 17, 21
|
|||||||
more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0
|
more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0
|
||||||
early access (EA) versions: 15-ea, 15.0.0-ea
|
early access (EA) versions: 15-ea, 15.0.0-ea
|
||||||
versions with specified distribution: openjdk64-11.0.2
|
versions with specified distribution: openjdk64-11.0.2
|
||||||
|
LTS versions : temurin-21.0.5+11.0.LTS
|
||||||
```
|
```
|
||||||
If the file contains multiple versions, only the first one will be recognized.
|
If the file contains multiple versions, only the first one will be recognized.
|
||||||
|
@ -133,7 +133,7 @@ export function getVersionFromFileContent(
|
|||||||
const versionFileName = getFileName(versionFile);
|
const versionFileName = getFileName(versionFile);
|
||||||
if (versionFileName == '.tool-versions') {
|
if (versionFileName == '.tool-versions') {
|
||||||
javaVersionRegExp =
|
javaVersionRegExp =
|
||||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\S+)?(\.\d+)?(-ea(\.\d+)?)?(\.LTS)?)$/m;
|
||||||
} else {
|
} else {
|
||||||
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user