mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
fix comments
This commit is contained in:
parent
1d25bcb6a7
commit
e6d2942770
6 changed files with 24 additions and 42 deletions
|
@ -1,3 +1,5 @@
|
|||
// Models from https://api.adoptopenjdk.net/swagger-ui/#/Assets/get_v3_assets_version__version
|
||||
|
||||
export interface IAdoptiumAvailableVersions {
|
||||
binaries: [
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ export abstract class JavaBase {
|
|||
protected stable: boolean;
|
||||
|
||||
constructor(protected distribution: string, installerOptions: JavaInstallerOptions) {
|
||||
this.http = new httpm.HttpClient('setup-java', undefined, {
|
||||
this.http = new httpm.HttpClient('actions/setup-java', undefined, {
|
||||
allowRetries: true,
|
||||
maxRetries: 3
|
||||
});
|
||||
|
@ -34,13 +34,13 @@ export abstract class JavaBase {
|
|||
if (foundJava) {
|
||||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||
} else {
|
||||
core.info(`Java ${this.version.raw} is not found in tool-cache. Trying to download...`);
|
||||
core.info(`Java ${this.version.raw} was not found in tool-cache. Trying to download...`);
|
||||
const javaRelease = await this.findPackageForDownload(this.version);
|
||||
foundJava = await this.downloadTool(javaRelease);
|
||||
core.info(`Java ${foundJava.version} was downloaded`);
|
||||
}
|
||||
|
||||
core.info(`Setting Java ${foundJava.version} as default`);
|
||||
core.info(`Setting Java ${foundJava.version} as the default`);
|
||||
this.setJavaDefault(foundJava.version, foundJava.path);
|
||||
|
||||
return foundJava;
|
||||
|
@ -103,7 +103,7 @@ export abstract class JavaBase {
|
|||
|
||||
if (!semver.validRange(version)) {
|
||||
throw new Error(
|
||||
`The string '${version}' is not valid SemVer notation for Java version. Please check README file for code snippets and more detailed information`
|
||||
`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ export class LocalDistribution extends JavaBase {
|
|||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||
} else {
|
||||
core.info(
|
||||
`Java ${this.version.raw} is not found in tool-cache. Trying to unpack JDK file...`
|
||||
`Java ${this.version.raw} was not found in tool-cache. Trying to unpack JDK file...`
|
||||
);
|
||||
if (!this.jdkFile) {
|
||||
throw new Error("'jdkFile' is not specified");
|
||||
|
@ -31,7 +31,7 @@ export class LocalDistribution extends JavaBase {
|
|||
const stats = fs.statSync(jdkFilePath);
|
||||
|
||||
if (!stats.isFile()) {
|
||||
throw new Error(`JDK file is not found in path '${jdkFilePath}'`);
|
||||
throw new Error(`JDK file was not found in path '${jdkFilePath}'`);
|
||||
}
|
||||
|
||||
core.info(`Extracting Java from '${jdkFilePath}'`);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Models from https://app.swaggerhub.com/apis-docs/azul/zulu-download-community/1.0
|
||||
|
||||
export interface IZuluVersions {
|
||||
id: number;
|
||||
name: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue