fix push to cache

pull/419/head
Frostebite 2022-09-03 04:09:17 +01:00
parent 3566d18112
commit 00b0e4979f
3 changed files with 3 additions and 1 deletions

1
dist/index.js vendored
View File

@ -3729,6 +3729,7 @@ class Caching {
cloud_runner_logger_1.default.log(`Hashed cache folder ${yield lfs_hashing_1.LfsHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${path_1.default.basename(sourceFolder)}`);
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tar -cvf ${cacheArtifactName}.tar.lz4 ${path_1.default.basename(sourceFolder)}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`du ${cacheArtifactName}.tar.lz4`);
console_1.assert(yield fileExists(`${cacheArtifactName}.tar.lz4`), 'cache archive exists');
console_1.assert(yield fileExists(path_1.default.basename(sourceFolder)), 'source folder exists');
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheArtifactName}.tar.lz4 ${cacheFolder}`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -60,6 +60,7 @@ export class Caching {
);
}
await CloudRunnerSystem.Run(`tar -cvf ${cacheArtifactName}.tar.lz4 ${path.basename(sourceFolder)}`);
await CloudRunnerSystem.Run(`du ${cacheArtifactName}.tar.lz4`);
assert(await fileExists(`${cacheArtifactName}.tar.lz4`), 'cache archive exists');
assert(await fileExists(path.basename(sourceFolder)), 'source folder exists');
await CloudRunnerSystem.Run(`mv ${cacheArtifactName}.tar.lz4 ${cacheFolder}`);