mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Suggest minor changes to the code of Semeru related PR (#2)
This commit is contained in:
parent
6457aa3c54
commit
a73fb66f44
5 changed files with 27 additions and 44 deletions
35
dist/setup/index.js
vendored
35
dist/setup/index.js
vendored
|
@ -104316,9 +104316,9 @@ const installer_3 = __nccwpck_require__(8766);
|
|||
const installer_4 = __nccwpck_require__(8579);
|
||||
const installer_5 = __nccwpck_require__(883);
|
||||
const installer_6 = __nccwpck_require__(3613);
|
||||
const installer_7 = __nccwpck_require__(4750);
|
||||
const installer_8 = __nccwpck_require__(4298);
|
||||
const installer_9 = __nccwpck_require__(1121);
|
||||
const installer_7 = __nccwpck_require__(1121);
|
||||
const installer_8 = __nccwpck_require__(4750);
|
||||
const installer_9 = __nccwpck_require__(4298);
|
||||
var JavaDistribution;
|
||||
(function (JavaDistribution) {
|
||||
JavaDistribution["Adopt"] = "adopt";
|
||||
|
@ -104351,11 +104351,11 @@ function getJavaDistribution(distributionName, installerOptions, jdkFile) {
|
|||
case JavaDistribution.Microsoft:
|
||||
return new installer_6.MicrosoftDistributions(installerOptions);
|
||||
case JavaDistribution.Semeru:
|
||||
return new installer_9.SemeruDistribution(installerOptions);
|
||||
return new installer_7.SemeruDistribution(installerOptions);
|
||||
case JavaDistribution.Corretto:
|
||||
return new installer_7.CorrettoDistribution(installerOptions);
|
||||
return new installer_8.CorrettoDistribution(installerOptions);
|
||||
case JavaDistribution.Oracle:
|
||||
return new installer_8.OracleDistribution(installerOptions);
|
||||
return new installer_9.OracleDistribution(installerOptions);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -105022,7 +105022,9 @@ class SemeruDistribution extends base_installer_1.JavaBase {
|
|||
const imageType = this.packageType;
|
||||
const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions
|
||||
const releaseType = this.stable ? 'ga' : 'ea';
|
||||
console.time('semeru-retrieve-available-versions'); // eslint-disable-line no-console
|
||||
if (core.isDebug()) {
|
||||
console.time('Retrieving available versions for Semeru took'); // eslint-disable-line no-console
|
||||
}
|
||||
const baseRequestArguments = [
|
||||
`project=jdk`,
|
||||
'vendor=ibm',
|
||||
|
@ -105046,17 +105048,7 @@ class SemeruDistribution extends base_installer_1.JavaBase {
|
|||
// url is identical except page_index so print it once for debug
|
||||
core.debug(`Gathering available versions from '${availableVersionsUrl}'`);
|
||||
}
|
||||
if (core.isDebug()) {
|
||||
core.debug('Semeru distribution version URL: ' + availableVersionsUrl);
|
||||
}
|
||||
let iTypedResponse = null;
|
||||
try {
|
||||
iTypedResponse = yield this.http.getJson(availableVersionsUrl);
|
||||
}
|
||||
catch (element) {
|
||||
console.log('error', element); // eslint-disable-line no-console
|
||||
}
|
||||
const paginationPage = iTypedResponse.result;
|
||||
const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result;
|
||||
if (paginationPage === null || paginationPage.length === 0) {
|
||||
// break infinity loop because we have reached end of pagination
|
||||
break;
|
||||
|
@ -105065,18 +105057,17 @@ class SemeruDistribution extends base_installer_1.JavaBase {
|
|||
page_index++;
|
||||
}
|
||||
if (core.isDebug()) {
|
||||
core.startGroup('Print information about available IBM Semeru versions');
|
||||
console.timeEnd('semeru-retrieve-available-versions'); // eslint-disable-line no-console
|
||||
core.startGroup('Print information about available versions');
|
||||
console.timeEnd('Retrieving available versions for Semeru took'); // eslint-disable-line no-console
|
||||
core.debug(`Available versions: [${availableVersions.length}]`);
|
||||
core.debug(availableVersions.map(item => item.version_data.semver).join(', '));
|
||||
core.debug(JSON.stringify(availableVersions));
|
||||
core.endGroup();
|
||||
}
|
||||
return availableVersions;
|
||||
});
|
||||
}
|
||||
getPlatformOption() {
|
||||
// Adoptium has own platform names so need to map them
|
||||
// Adopt has own platform names so need to map them
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return 'mac';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue