minor changes

This commit is contained in:
Dmitry Shibanov 2022-09-05 15:25:05 +02:00
parent 7b84a4c0bd
commit 1ba38a2e76
3 changed files with 16 additions and 16 deletions

8
dist/setup/index.js vendored
View file

@ -102435,7 +102435,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
if (!availableVersionsRaw) {
throw new Error('Could not load manifest for Microsoft Build of OpenJDK');
}
const foundRelease = yield tc.findFromManifest(range, true, availableVersionsRaw.map(item => Object.assign(item, { release_url: '' })), this.architecture);
const foundRelease = yield tc.findFromManifest(range, true, availableVersionsRaw, this.architecture);
// const opts = this.getPlatformOption();
// const availableVersions = availableVersionsRaw.map(item => ({
// url: `https://aka.ms/download-jdk/microsoft-jdk-${item.version.join('.')}-${opts.os}-${
@ -102468,10 +102468,8 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
// TODO get these dynamically!
// We will need Microsoft to add an endpoint where we can query for versions.
const token = core.getInput('token');
const { result, statusCode } = (yield this.http.getJson('https://github.com/dmitry-shibanov/setup-java/blob/add-json-for-microsoft-versions/microsoft-build-of-openjdk-versions.json', { authorization: token }));
core.info(result);
core.info(statusCode.toString());
return result;
const manifest = yield tc.getManifestFromRepo('dmitry-shibanov', 'setup-java', token, 'add-json-for-microsoft-versions');
return manifest;
});
}
getPlatformOption(platform = process.platform /* for testing */) {