mirror of
https://github.com/actions/setup-java.git
synced 2025-04-19 09:26:46 +00:00
added changes to distribution files
This commit is contained in:
parent
ff70a8950d
commit
6bbc741f10
5 changed files with 76 additions and 7 deletions
29
dist/setup/index.js
vendored
29
dist/setup/index.js
vendored
|
@ -123685,9 +123685,15 @@ class LibericaDistributions extends base_installer_1.JavaBase {
|
||||||
downloadTool(javaRelease) {
|
downloadTool(javaRelease) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||||
|
if (process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||||
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||||
|
@ -123967,7 +123973,18 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
|
||||||
downloadTool(javaRelease) {
|
downloadTool(javaRelease) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
|
if (process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||||
|
@ -124635,9 +124652,15 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
||||||
downloadTool(javaRelease) {
|
downloadTool(javaRelease) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||||
|
if (process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||||
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||||
|
|
|
@ -31,10 +31,18 @@ export class LibericaDistributions extends JavaBase {
|
||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||||
|
|
||||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||||
|
|
|
@ -26,7 +26,20 @@ export class MicrosoftDistributions extends JavaBase {
|
||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
// Rename archive to add extension because after downloading
|
||||||
|
// archive does not contain extension type and it leads to some issues
|
||||||
|
// on Windows runners without PowerShell Core.
|
||||||
|
//
|
||||||
|
// For default PowerShell Windows it should contain extension type to unpack it.
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
|
|
@ -33,6 +33,12 @@
|
||||||
"arch": "aarch64",
|
"arch": "aarch64",
|
||||||
"platform": "linux",
|
"platform": "linux",
|
||||||
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-aarch64.tar.gz"
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-aarch64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-21.0.0-windows-aarch64.zip",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-windows-aarch64.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -70,6 +76,12 @@
|
||||||
"arch": "aarch64",
|
"arch": "aarch64",
|
||||||
"platform": "linux",
|
"platform": "linux",
|
||||||
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-17.0.7-windows-aarch64.zip",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-aarch64.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -329,6 +341,12 @@
|
||||||
"arch": "aarch64",
|
"arch": "aarch64",
|
||||||
"platform": "linux",
|
"platform": "linux",
|
||||||
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz"
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "microsoft-jdk-11.0.19-windows-aarch64.zip",
|
||||||
|
"arch": "aarch64",
|
||||||
|
"platform": "win32",
|
||||||
|
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-aarch64.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -76,11 +76,18 @@ export class ZuluDistribution extends JavaBase {
|
||||||
core.info(
|
core.info(
|
||||||
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
|
||||||
);
|
);
|
||||||
const javaArchivePath = await tc.downloadTool(javaRelease.url);
|
let javaArchivePath = await tc.downloadTool(javaRelease.url);
|
||||||
|
|
||||||
core.info(`Extracting Java archive...`);
|
core.info(`Extracting Java archive...`);
|
||||||
const extension = getDownloadArchiveExtension();
|
const extension = getDownloadArchiveExtension();
|
||||||
|
if (
|
||||||
|
process.platform === 'win32' &&
|
||||||
|
(this.architecture === 'arm64' || this.architecture === 'aarch64')
|
||||||
|
) {
|
||||||
|
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||||
|
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||||
|
javaArchivePath = javaArchivePathRenamed;
|
||||||
|
}
|
||||||
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
|
||||||
|
|
||||||
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
const archiveName = fs.readdirSync(extractedJavaPath)[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue