mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-01-19 03:43:02 +08:00
Try download with extension.
This commit is contained in:
parent
2f82a03f52
commit
48e7cabb7c
6
dist/main/index.js
generated
vendored
6
dist/main/index.js
generated
vendored
@ -18568,9 +18568,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.setUpGraalVMRelease = exports.setUpGraalVMDevBuild = exports.getLatestReleaseVersion = exports.setUpGraalVMLatest = void 0;
|
exports.setUpGraalVMRelease = exports.setUpGraalVMDevBuild = exports.getLatestReleaseVersion = exports.setUpGraalVMLatest = void 0;
|
||||||
const c = __importStar(__nccwpck_require__(9042));
|
const c = __importStar(__nccwpck_require__(9042));
|
||||||
|
const path_1 = __nccwpck_require__(1017);
|
||||||
const utils_1 = __nccwpck_require__(1314);
|
const utils_1 = __nccwpck_require__(1314);
|
||||||
const gds_1 = __nccwpck_require__(9543);
|
const gds_1 = __nccwpck_require__(9543);
|
||||||
const tool_cache_1 = __nccwpck_require__(7784);
|
const tool_cache_1 = __nccwpck_require__(7784);
|
||||||
|
const uuid_1 = __nccwpck_require__(5840);
|
||||||
const GRAALVM_CE_DL_BASE = 'https://github.com/graalvm/graalvm-ce-builds/releases/download';
|
const GRAALVM_CE_DL_BASE = 'https://github.com/graalvm/graalvm-ce-builds/releases/download';
|
||||||
const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds';
|
const GRAALVM_REPO_DEV_BUILDS = 'graalvm-ce-dev-builds';
|
||||||
const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds';
|
const GRAALVM_REPO_RELEASES = 'graalvm-ce-builds';
|
||||||
@ -18624,7 +18626,9 @@ function setUpGraalVMRelease(gdsToken, version, javaVersion) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const downloadUrl = `${GRAALVM_CE_DL_BASE}/${GRAALVM_TAG_PREFIX}${version}/${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`;
|
const downloadUrl = `${GRAALVM_CE_DL_BASE}/${GRAALVM_TAG_PREFIX}${version}/${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`;
|
||||||
downloader = () => __awaiter(this, void 0, void 0, function* () { return tool_cache_1.downloadTool(downloadUrl); });
|
downloader = () => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return tool_cache_1.downloadTool(downloadUrl, path_1.join(process.env['RUNNER_TEMP'] || '', `${uuid_1.v4()}${c.GRAALVM_FILE_EXTENSION}`));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return utils_1.downloadExtractAndCacheJDK(downloader, toolName, version);
|
return utils_1.downloadExtractAndCacheJDK(downloader, toolName, version);
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants'
|
||||||
|
import {join} from 'path'
|
||||||
import {
|
import {
|
||||||
downloadAndExtractJDK,
|
downloadAndExtractJDK,
|
||||||
downloadExtractAndCacheJDK,
|
downloadExtractAndCacheJDK,
|
||||||
@ -6,6 +7,7 @@ import {
|
|||||||
} from './utils'
|
} from './utils'
|
||||||
import {downloadGraalVMEE} from './gds'
|
import {downloadGraalVMEE} from './gds'
|
||||||
import {downloadTool} from '@actions/tool-cache'
|
import {downloadTool} from '@actions/tool-cache'
|
||||||
|
import {v4 as uuidv4} from 'uuid'
|
||||||
|
|
||||||
const GRAALVM_CE_DL_BASE =
|
const GRAALVM_CE_DL_BASE =
|
||||||
'https://github.com/graalvm/graalvm-ce-builds/releases/download'
|
'https://github.com/graalvm/graalvm-ce-builds/releases/download'
|
||||||
@ -74,7 +76,14 @@ export async function setUpGraalVMRelease(
|
|||||||
downloader = async () => downloadGraalVMEE(gdsToken, version, javaVersion)
|
downloader = async () => downloadGraalVMEE(gdsToken, version, javaVersion)
|
||||||
} else {
|
} else {
|
||||||
const downloadUrl = `${GRAALVM_CE_DL_BASE}/${GRAALVM_TAG_PREFIX}${version}/${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`
|
const downloadUrl = `${GRAALVM_CE_DL_BASE}/${GRAALVM_TAG_PREFIX}${version}/${graalVMIdentifier}${c.GRAALVM_FILE_EXTENSION}`
|
||||||
downloader = async () => downloadTool(downloadUrl)
|
downloader = async () =>
|
||||||
|
downloadTool(
|
||||||
|
downloadUrl,
|
||||||
|
join(
|
||||||
|
process.env['RUNNER_TEMP'] || '',
|
||||||
|
`${uuidv4()}${c.GRAALVM_FILE_EXTENSION}`
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
return downloadExtractAndCacheJDK(downloader, toolName, version)
|
return downloadExtractAndCacheJDK(downloader, toolName, version)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user