move results directory then rename
parent
a2ab870e8f
commit
c2b658a8d3
|
|
@ -603,8 +603,9 @@ class Caching {
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path_1.default.basename(resultsDirectory)}`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path_1.default.basename(resultsDirectory)}`);
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
||||||
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
|
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullDestination}/*" "${destinationFolder}"`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}/.."`);
|
||||||
fs_1.default.rmdirSync(fullDestination);
|
fs_1.default.rmdirSync(destinationFolder);
|
||||||
|
fs_1.default.renameSync(`${destinationFolder}/../${resultsDirectory}`, destinationFolder);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -77,8 +77,9 @@ export class Caching {
|
||||||
await CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path.basename(resultsDirectory)}`);
|
await CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path.basename(resultsDirectory)}`);
|
||||||
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
||||||
assert(`${fs.existsSync(fullDestination)}`);
|
assert(`${fs.existsSync(fullDestination)}`);
|
||||||
await CloudRunnerSystem.Run(`mv "${fullDestination}/*" "${destinationFolder}"`);
|
await CloudRunnerSystem.Run(`mv "${fullDestination}" "${destinationFolder}/.."`);
|
||||||
fs.rmdirSync(fullDestination);
|
fs.rmdirSync(destinationFolder);
|
||||||
|
fs.renameSync(`${destinationFolder}/../${resultsDirectory}`, destinationFolder);
|
||||||
} else {
|
} else {
|
||||||
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
||||||
if (cacheSelection !== ``) {
|
if (cacheSelection !== ``) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue