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