1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2024-11-24 04:29:16 +01:00

Updated new actions dist files

This commit is contained in:
Sankalp Kotewar 2022-12-09 09:42:25 +00:00 committed by GitHub
parent f426a0deb2
commit 804322aab0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 10 deletions

View file

@ -47167,6 +47167,7 @@ const path = __importStar(__webpack_require__(622));
const utils = __importStar(__webpack_require__(15)); const utils = __importStar(__webpack_require__(15));
const cacheHttpClient = __importStar(__webpack_require__(114)); const cacheHttpClient = __importStar(__webpack_require__(114));
const tar_1 = __webpack_require__(434); const tar_1 = __webpack_require__(434);
const constants_1 = __webpack_require__(931);
class ValidationError extends Error { class ValidationError extends Error {
constructor(message) { constructor(message) {
super(message); super(message);
@ -47228,13 +47229,33 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
for (const key of keys) { for (const key of keys) {
checkKey(key); checkKey(key);
} }
const compressionMethod = yield utils.getCompressionMethod(); let cacheEntry;
let compressionMethod = yield utils.getCompressionMethod();
let archivePath = ''; let archivePath = '';
try { try {
// path are needed to compute version try {
const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { // path are needed to compute version
compressionMethod cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
}); compressionMethod
});
}
catch (error) {
// This is to support the old cache entry created
// by the old version of the cache action on windows.
if (process.platform === 'win32' &&
compressionMethod !== constants_1.CompressionMethod.Gzip) {
compressionMethod = constants_1.CompressionMethod.Gzip;
cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
compressionMethod
});
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
throw error;
}
}
else {
throw error;
}
}
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
// Cache not found // Cache not found
return undefined; return undefined;

View file

@ -47251,6 +47251,7 @@ const path = __importStar(__webpack_require__(622));
const utils = __importStar(__webpack_require__(15)); const utils = __importStar(__webpack_require__(15));
const cacheHttpClient = __importStar(__webpack_require__(114)); const cacheHttpClient = __importStar(__webpack_require__(114));
const tar_1 = __webpack_require__(434); const tar_1 = __webpack_require__(434);
const constants_1 = __webpack_require__(931);
class ValidationError extends Error { class ValidationError extends Error {
constructor(message) { constructor(message) {
super(message); super(message);
@ -47312,13 +47313,33 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
for (const key of keys) { for (const key of keys) {
checkKey(key); checkKey(key);
} }
const compressionMethod = yield utils.getCompressionMethod(); let cacheEntry;
let compressionMethod = yield utils.getCompressionMethod();
let archivePath = ''; let archivePath = '';
try { try {
// path are needed to compute version try {
const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { // path are needed to compute version
compressionMethod cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
}); compressionMethod
});
}
catch (error) {
// This is to support the old cache entry created
// by the old version of the cache action on windows.
if (process.platform === 'win32' &&
compressionMethod !== constants_1.CompressionMethod.Gzip) {
compressionMethod = constants_1.CompressionMethod.Gzip;
cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {
compressionMethod
});
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
throw error;
}
}
else {
throw error;
}
}
if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {
// Cache not found // Cache not found
return undefined; return undefined;