minor changes

This commit is contained in:
Dmitry Shibanov 2022-09-05 15:07:57 +02:00
parent e2b8e57140
commit 7b84a4c0bd
2 changed files with 9 additions and 7 deletions

7
dist/setup/index.js vendored
View file

@ -102468,9 +102468,10 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
// TODO get these dynamically! // TODO get these dynamically!
// We will need Microsoft to add an endpoint where we can query for versions. // We will need Microsoft to add an endpoint where we can query for versions.
const token = core.getInput('token'); const token = core.getInput('token');
const manifest = (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 })).result; 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(manifest); core.info(result);
return manifest; core.info(statusCode.toString());
return result;
}); });
} }
getPlatformOption(platform = process.platform /* for testing */) { getPlatformOption(platform = process.platform /* for testing */) {

View file

@ -104,16 +104,17 @@ export class MicrosoftDistributions extends JavaBase {
// TODO get these dynamically! // TODO get these dynamically!
// We will need Microsoft to add an endpoint where we can query for versions. // We will need Microsoft to add an endpoint where we can query for versions.
const token = core.getInput('token'); const token = core.getInput('token');
const manifest = ( const {result, statusCode} = (
await this.http.getJson<any>( await this.http.getJson<any>(
'https://github.com/dmitry-shibanov/setup-java/blob/add-json-for-microsoft-versions/microsoft-build-of-openjdk-versions.json', 'https://github.com/dmitry-shibanov/setup-java/blob/add-json-for-microsoft-versions/microsoft-build-of-openjdk-versions.json',
{ authorization: token } { authorization: token }
) )
).result; );
core.info(manifest); core.info(result);
core.info(statusCode.toString());
return manifest; return result;
} }
private getPlatformOption( private getPlatformOption(