mirror of
https://github.com/actions/setup-java.git
synced 2025-06-30 21:04:16 +00:00
Simplified latest parameter setting
This commit is contained in:
parent
a314fce4b5
commit
131290ed3e
2 changed files with 6 additions and 30 deletions
|
@ -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