mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
added test cases for windows and linux for zulu, liberica and microsoft
This commit is contained in:
parent
65505d41c2
commit
e707d79108
12 changed files with 1089 additions and 61 deletions
16
dist/setup/index.js
vendored
16
dist/setup/index.js
vendored
|
@ -123685,15 +123685,9 @@ class LibericaDistributions extends base_installer_1.JavaBase {
|
|||
downloadTool(javaRelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
core.info(`Extracting Java archive...`);
|
||||
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 archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||
|
@ -124641,15 +124635,9 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
|||
downloadTool(javaRelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
core.info(`Extracting Java archive...`);
|
||||
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 archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue