mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Simplified latest parameter setting
This commit is contained in:
parent
a314fce4b5
commit
131290ed3e
2 changed files with 6 additions and 30 deletions
18
dist/setup/index.js
vendored
18
dist/setup/index.js
vendored
|
@ -33705,20 +33705,6 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') {
|
|||
archiveType = distribution === 'ojdk_build' ? 'zip' : 'tar.gz';
|
||||
}
|
||||
}
|
||||
let latest = '';
|
||||
if (version.endsWith('x')) {
|
||||
if (version.endsWith('.x')) {
|
||||
version = version.slice(0, -2);
|
||||
latest = 'per_version';
|
||||
}
|
||||
else {
|
||||
version = version.slice(0, -1);
|
||||
latest = 'overall';
|
||||
}
|
||||
}
|
||||
if (version.includes('ea')) {
|
||||
latest = 'overall';
|
||||
}
|
||||
let url = constants_1.DISCO_URL + constants_1.PACKAGES_PATH;
|
||||
url += '?distro=' + distribution;
|
||||
if (version.length != 0) {
|
||||
|
@ -33738,7 +33724,9 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') {
|
|||
url += '&architecture=' + architecture;
|
||||
url += '&operating_system=' + operatingSystem;
|
||||
url += '&archive_type=' + archiveType;
|
||||
url += '&latest=' + latest;
|
||||
if (version.endsWith('x') || version.includes('ea')) {
|
||||
url += '&latest=overall';
|
||||
}
|
||||
const http = new httpm.HttpClient('bundles', undefined, {
|
||||
allowRetries: true,
|
||||
maxRetries: 3
|
||||
|
|
|
@ -236,20 +236,6 @@ async function getDownloadInfo(
|
|||
}
|
||||
}
|
||||
|
||||
let latest = '';
|
||||
if (version.endsWith('x')) {
|
||||
if (version.endsWith('.x')) {
|
||||
version = version.slice(0, -2);
|
||||
latest = 'per_version';
|
||||
} else {
|
||||
version = version.slice(0, -1);
|
||||
latest = 'overall';
|
||||
}
|
||||
}
|
||||
if (version.includes('ea')) {
|
||||
latest = 'overall';
|
||||
}
|
||||
|
||||
let url = DISCO_URL + PACKAGES_PATH;
|
||||
url += '?distro=' + distribution;
|
||||
if (version.length != 0) {
|
||||
|
@ -268,7 +254,9 @@ async function getDownloadInfo(
|
|||
url += '&architecture=' + architecture;
|
||||
url += '&operating_system=' + operatingSystem;
|
||||
url += '&archive_type=' + archiveType;
|
||||
url += '&latest=' + latest;
|
||||
if (version.endsWith('x') || version.includes('ea')) {
|
||||
url += '&latest=overall';
|
||||
}
|
||||
|
||||
const http = new httpm.HttpClient('bundles', undefined, {
|
||||
allowRetries: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue