@@ -64536,7 +64536,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6453664536 return (mod && mod.__esModule) ? mod : { "default": mod };
6453764537};
6453864538Object.defineProperty(exports, "__esModule", { value: true });
64539- exports.save = exports.restore = void 0;
64539+ exports.save = exports.restore = exports.computeCacheKey = exports.findPackageManager = void 0;
6454064540const path_1 = __webpack_require__(622);
6454164541const os_1 = __importDefault(__webpack_require__(87));
6454264542const cache = __importStar(__webpack_require__(692));
@@ -64566,18 +64566,20 @@ function findPackageManager(id) {
6456664566 }
6456764567 return packageManager;
6456864568}
64569+ exports.findPackageManager = findPackageManager;
6456964570/**
6457064571 * A function that generates a cache key to use.
64571- * Format of the generated key will be "${{ platform }} -${{ id }}-${{ fileHash }}"".
64572+ * Format of the generated key will be "setup-java -${{ id }}-${{ fileHash }}"".
6457264573 * If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-).
6457364574 * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
6457464575 */
6457564576function computeCacheKey(packageManager) {
6457664577 return __awaiter(this, void 0, void 0, function* () {
6457764578 const hash = yield glob.hashFiles(packageManager.pattern.join('\n'));
64578- return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${ packageManager.id}-${hash}`;
64579+ return `${CACHE_KEY_PREFIX}-${packageManager.id}-${hash}`;
6457964580 });
6458064581}
64582+ exports.computeCacheKey = computeCacheKey;
6458164583/**
6458264584 * Restore the dependency cache
6458364585 * @param id ID of the package manager, should be "maven" or "gradle"
@@ -64592,7 +64594,7 @@ function restore(id) {
6459264594 throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
6459364595 }
6459464596 const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [
64595- `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${ id}`
64597+ `${CACHE_KEY_PREFIX}-${id}`
6459664598 ]);
6459764599 if (matchedKey) {
6459864600 core.saveState(CACHE_MATCHED_KEY, matchedKey);
0 commit comments