move caching folder fix
parent
f2ef0b73c9
commit
f4eccf6a32
|
|
@ -635,7 +635,7 @@ class Caching {
|
|||
fs_1.default.createReadStream(`${cacheSelection}.zip`).pipe(unzipper_1.default.Extract({ path: resultsDirectory }));
|
||||
remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
||||
console_1.assert(`${fs_1.default.existsSync(fullDestination)}`);
|
||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv -v "${fullDestination}/*" "${destinationFolder}"`);
|
||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`mv -v "${fullDestination}/" "${destinationFolder}"`);
|
||||
fs_1.default.rmdirSync(fullDestination);
|
||||
}
|
||||
else {
|
||||
|
|
@ -700,7 +700,9 @@ class CloudRunnerSystem {
|
|||
throw error;
|
||||
}
|
||||
if (stderr) {
|
||||
remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(`${stderr.toString()}`);
|
||||
const diagnosticOutput = `${stderr.toString()}`;
|
||||
remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(diagnosticOutput);
|
||||
output += diagnosticOutput;
|
||||
return;
|
||||
}
|
||||
const outputChunk = `${stdout}`;
|
||||
|
|
@ -3564,13 +3566,14 @@ exports.GitRepoReader = void 0;
|
|||
const console_1 = __webpack_require__(57082);
|
||||
const system_1 = __importDefault(__webpack_require__(62177));
|
||||
const fs_1 = __importDefault(__webpack_require__(35747));
|
||||
const cloud_runner_system_1 = __webpack_require__(66879);
|
||||
class GitRepoReader {
|
||||
static GetSha() {
|
||||
return '';
|
||||
}
|
||||
static GetRemote() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return (yield system_1.default.run(`git remote -v`, [], {}, false))
|
||||
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`git remote -v`))
|
||||
.split(' ')[1]
|
||||
.split('https://github.com/')[1]
|
||||
.split('.git')[0];
|
||||
|
|
@ -3602,24 +3605,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.GithubCliReader = void 0;
|
||||
const system_1 = __importDefault(__webpack_require__(62177));
|
||||
const cloud_runner_system_1 = __webpack_require__(66879);
|
||||
class GithubCliReader {
|
||||
static GetGitHubAuthToken() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
return (yield system_1.default.run(`gh auth status -t`, [], {}, false))
|
||||
.split(`Token: `)[1]
|
||||
.replace(/ /g, '')
|
||||
.replace(/\n/g, '');
|
||||
}
|
||||
catch (_a) {
|
||||
return '';
|
||||
}
|
||||
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`)).split(`Token: `)[1].replace(/ /g, '').replace(/\n/g, '');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -108,7 +108,7 @@ export class Caching {
|
|||
fs.createReadStream(`${cacheSelection}.zip`).pipe(unzipper.Extract({ path: resultsDirectory }));
|
||||
RemoteClientLogger.log(`cache item extracted to ${fullDestination}`);
|
||||
assert(`${fs.existsSync(fullDestination)}`);
|
||||
await CloudRunnerSystem.Run(`mv -v "${fullDestination}/*" "${destinationFolder}"`);
|
||||
await CloudRunnerSystem.Run(`mv -v "${fullDestination}/" "${destinationFolder}"`);
|
||||
fs.rmdirSync(fullDestination);
|
||||
} else {
|
||||
RemoteClientLogger.logWarning(`cache item ${cacheKey} doesn't exist ${destinationFolder}`);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,9 @@ export class CloudRunnerSystem {
|
|||
throw error;
|
||||
}
|
||||
if (stderr) {
|
||||
RemoteClientLogger.logCliDiagnostic(`${stderr.toString()}`);
|
||||
const diagnosticOutput = `${stderr.toString()}`;
|
||||
RemoteClientLogger.logCliDiagnostic(diagnosticOutput);
|
||||
output += diagnosticOutput;
|
||||
return;
|
||||
}
|
||||
const outputChunk = `${stdout}`;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
import { assert } from 'console';
|
||||
import System from '../system';
|
||||
import fs from 'fs';
|
||||
import { CloudRunnerSystem } from '../cli/remote-client/remote-client-services/cloud-runner-system';
|
||||
|
||||
export class GitRepoReader {
|
||||
static GetSha() {
|
||||
return '';
|
||||
}
|
||||
public static async GetRemote() {
|
||||
return (await System.run(`git remote -v`, [], {}, false))
|
||||
return (await CloudRunnerSystem.Run(`git remote -v`))
|
||||
.split(' ')[1]
|
||||
.split('https://github.com/')[1]
|
||||
.split('.git')[0];
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
import System from '../system';
|
||||
import { CloudRunnerSystem } from '../cli/remote-client/remote-client-services/cloud-runner-system';
|
||||
|
||||
export class GithubCliReader {
|
||||
static async GetGitHubAuthToken() {
|
||||
try {
|
||||
return (await System.run(`gh auth status -t`, [], {}, false))
|
||||
.split(`Token: `)[1]
|
||||
.replace(/ /g, '')
|
||||
.replace(/\n/g, '');
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
return (await CloudRunnerSystem.Run(`gh auth status -t`)).split(`Token: `)[1].replace(/ /g, '').replace(/\n/g, '');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue