Fix lib caching

pull/310/head
Frostebite 2021-12-27 18:11:26 +00:00
parent 5e031c9f66
commit da5ffaa0b2
3 changed files with 3 additions and 5 deletions

3
dist/index.js vendored
View File

@ -668,11 +668,10 @@ class SetupRemoteRepository {
const latestLibraryCacheFile = yield remote_client_system_1.RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`); const latestLibraryCacheFile = yield remote_client_system_1.RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`);
yield remote_client_system_1.RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`); yield remote_client_system_1.RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`);
cloud_runner_logger_1.default.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`); cloud_runner_logger_1.default.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
const latestCacheFilePath = path_1.default.join(libraryCacheFolder, latestLibraryCacheFile);
process.chdir(libraryCacheFolder); process.chdir(libraryCacheFolder);
if (latestLibraryCacheFile !== '') { if (latestLibraryCacheFile !== '') {
cloud_runner_logger_1.default.logCli(`Library cache exists`); cloud_runner_logger_1.default.logCli(`Library cache exists`);
yield remote_client_system_1.RemoteClientSystem.Run(`unzip -q "${latestCacheFilePath}" -d "$projectPathFull"`); yield remote_client_system_1.RemoteClientSystem.Run(`unzip -q "${latestLibraryCacheFile}" -d "${cloud_runner_state_1.CloudRunnerState.libraryFolderFull}"`);
} }
else { else {
cloud_runner_logger_1.default.logCli(`Library cache doesn't exist`); cloud_runner_logger_1.default.logCli(`Library cache doesn't exist`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -131,11 +131,10 @@ export class SetupRemoteRepository {
const latestLibraryCacheFile = await RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`); const latestLibraryCacheFile = await RemoteClientSystem.Run(`ls -t "${libraryCacheFolder}" | grep .zip$ | head -1`);
await RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`); await RemoteClientSystem.Run(`ls -lh "${libraryCacheFolder}"`);
CloudRunnerLogger.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`); CloudRunnerLogger.logCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
const latestCacheFilePath = path.join(libraryCacheFolder, latestLibraryCacheFile);
process.chdir(libraryCacheFolder); process.chdir(libraryCacheFolder);
if (latestLibraryCacheFile !== '') { if (latestLibraryCacheFile !== '') {
CloudRunnerLogger.logCli(`Library cache exists`); CloudRunnerLogger.logCli(`Library cache exists`);
await RemoteClientSystem.Run(`unzip -q "${latestCacheFilePath}" -d "$projectPathFull"`); await RemoteClientSystem.Run(`unzip -q "${latestLibraryCacheFile}" -d "${CloudRunnerState.libraryFolderFull}"`);
} else { } else {
CloudRunnerLogger.logCli(`Library cache doesn't exist`); CloudRunnerLogger.logCli(`Library cache doesn't exist`);
if (latestLibraryCacheFile !== ``) { if (latestLibraryCacheFile !== ``) {