Caching cleanup

pull/310/head
Frostebite 2022-01-02 04:38:59 +00:00
parent 81979ddaca
commit dc27bd4fe8
3 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View File

@ -576,7 +576,6 @@ class Caching {
const latestInBranch = yield (yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -t "${cacheFolder}" | grep .zip$ | head -1`)).replace(/\n/g, ``);
process.chdir(cacheFolder);
if (__1.Input.cloudRunnerTests) {
cloud_runner_logger_1.default.log(yield lfs_hashing_1.LFSHashing.hashAllFiles(destinationFolder));
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
}
const cacheSelection = cacheKey !== `` && fs_1.default.existsSync(cacheKey) ? cacheKey : latestInBranch;
@ -589,7 +588,8 @@ class Caching {
}
remote_client_logger_1.RemoteClientLogger.log(`cache item exists`);
console_1.assert(fs_1.default.existsSync(destinationFolder));
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${path_1.default.dirname(destinationFolder)}"`);
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`cp -r "${cacheSelection}" "${destinationFolder}/..""`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -54,7 +54,6 @@ export class Caching {
process.chdir(cacheFolder);
if (Input.cloudRunnerTests) {
CloudRunnerLogger.log(await LFSHashing.hashAllFiles(destinationFolder));
await CloudRunnerAgentSystem.Run(`tree ${cacheFolder}`);
}
@ -70,7 +69,8 @@ export class Caching {
}
RemoteClientLogger.log(`cache item exists`);
assert(fs.existsSync(destinationFolder));
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${path.dirname(destinationFolder)}"`);
await CloudRunnerAgentSystem.Run(`cp -r "${cacheSelection}" "${destinationFolder}/..""`);
if (Input.cloudRunnerTests) {
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
}