Remove unused tree commands

pull/353/head
Frostebite 2022-03-05 19:08:38 +00:00
parent 4d9d9991d1
commit 2247a37a2c
4 changed files with 14 additions and 45 deletions

28
dist/index.js vendored
View File

@ -665,16 +665,10 @@ class Caching {
if (fs_1.default.existsSync(`${cacheSelection}.zip`)) {
const resultsFolder = `results${cloud_runner_state_1.CloudRunnerState.buildParams.buildGuid}`;
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${resultsFolder}`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationFolder}`);
}
remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`);
console_1.assert(`${fs_1.default.existsSync(destinationFolder)}`);
console_1.assert(`${fs_1.default.existsSync(`${cacheSelection}.zip`)}`);
const fullResultsFolder = path_1.default.join(cacheFolder, resultsFolder);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path_1.default.basename(resultsFolder)}`);
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`);
console_1.assert(`${fs_1.default.existsSync(fullResultsFolder)}`);
@ -683,16 +677,10 @@ class Caching {
fs_1.default.rmSync(destinationFolder, { recursive: true, force: true });
}
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv "${fullResultsFolder}/${path_1.default.basename(destinationFolder)}" "${destinationParentFolder}"`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${destinationParentFolder}`);
}
}
else {
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
if (cacheSelection !== ``) {
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheKey}.zip doesn't exist ${destinationFolder}`);
throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`);
}
@ -912,15 +900,7 @@ class SetupCloudRunnerRepository {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}`);
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`);
}
yield SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh`);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`tree`);
}
const lfsHashes = yield lfs_hashing_1.LFSHashing.createLFSHashFiles();
if (fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull)) {
remote_client_logger_1.RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`);
@ -958,12 +938,16 @@ class SetupCloudRunnerRepository {
}
static pullLatestLFS() {
return __awaiter(this, void 0, void 0, function* () {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
}
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);
remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);
console_1.assert(fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull));
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
if (__1.Input.cloudRunnerTests) {
yield cloud_runner_system_1.CloudRunnerSystem.Run(`ls -lh ${cloud_runner_state_1.CloudRunnerState.lfsDirectoryFull}/..`);
}
});
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -68,16 +68,10 @@ export class Caching {
if (fs.existsSync(`${cacheSelection}.zip`)) {
const resultsFolder = `results${CloudRunnerState.buildParams.buildGuid}`;
await CloudRunnerSystem.Run(`mkdir -p ${resultsFolder}`);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${destinationFolder}`);
}
RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.zip`);
assert(`${fs.existsSync(destinationFolder)}`);
assert(`${fs.existsSync(`${cacheSelection}.zip`)}`);
const fullResultsFolder = path.join(cacheFolder, resultsFolder);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
await CloudRunnerSystem.Run(`unzip ${cacheSelection}.zip -d ${path.basename(resultsFolder)}`);
RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`);
assert(`${fs.existsSync(fullResultsFolder)}`);
@ -88,15 +82,9 @@ export class Caching {
await CloudRunnerSystem.Run(
`mv "${fullResultsFolder}/${path.basename(destinationFolder)}" "${destinationParentFolder}"`,
);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${destinationParentFolder}`);
}
} else {
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
if (cacheSelection !== ``) {
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`tree ${cacheFolder}`);
}
RemoteClientLogger.logWarning(`cache item ${cacheKey}.zip doesn't exist ${destinationFolder}`);
throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`);
}

View File

@ -16,15 +16,7 @@ export class SetupCloudRunnerRepository {
await CloudRunnerSystem.Run(`mkdir -p ${CloudRunnerState.cacheFolderFull}`);
process.chdir(CloudRunnerState.repoPathFull);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`ls -lh`);
await CloudRunnerSystem.Run(`tree`);
}
await SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`ls -lh`);
await CloudRunnerSystem.Run(`tree`);
}
const lfsHashes = await LFSHashing.createLFSHashFiles();
if (fs.existsSync(CloudRunnerState.libraryFolderFull)) {
RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`);
@ -71,11 +63,16 @@ export class SetupCloudRunnerRepository {
}
private static async pullLatestLFS() {
await CloudRunnerSystem.Run(`ls -lh ${CloudRunnerState.lfsDirectoryFull}/..`);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`ls -lh ${CloudRunnerState.lfsDirectoryFull}/..`);
}
process.chdir(CloudRunnerState.repoPathFull);
await CloudRunnerSystem.Run(`git lfs pull`);
RemoteClientLogger.log(`pulled latest LFS files`);
assert(fs.existsSync(CloudRunnerState.lfsDirectoryFull));
await CloudRunnerSystem.Run(`ls -lh ${CloudRunnerState.lfsDirectoryFull}/..`);
if (Input.cloudRunnerTests) {
await CloudRunnerSystem.Run(`ls -lh ${CloudRunnerState.lfsDirectoryFull}/..`);
}
}
}