Skip to content

Commit d5b0fc3

Browse files
test
1 parent 17ed4d8 commit d5b0fc3

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function run() {
2828
yield command_1.runBuild();
2929
const files = yield command_1.getDiffFiles();
3030
signale_1.default.info(`Diff files count: ${files.length}`);
31+
signale_1.default.info(files);
3132
if (!files.length)
3233
return;
3334
// const blobs = await filesToBlobs(files, octokit, context);

lib/utils/command.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,27 @@ const signale_1 = __importDefault(require("signale"));
1515
const child_process_1 = require("child_process");
1616
const misc_1 = require("./misc");
1717
exports.clone = (context) => __awaiter(this, void 0, void 0, function* () {
18-
signale_1.default.info(yield execAsync('ls -lat'));
1918
if (misc_1.isGitCloned())
2019
return;
2120
const url = misc_1.getGitUrl(context);
2221
const depth = misc_1.getCloneDepth();
2322
const workspace = misc_1.getWorkspace();
2423
yield execAsync(`git -C ${workspace} clone --depth=${depth} ${url} .`);
2524
yield execAsync(`git -C ${workspace} fetch origin ${context.ref}`);
26-
signale_1.default.info(yield execAsync('ls -lat'));
2725
yield execAsync(`git -C ${workspace} checkout -qf ${context.sha}`);
2826
});
2927
exports.runBuild = () => __awaiter(this, void 0, void 0, function* () {
3028
const commands = misc_1.getBuildCommands();
3129
if (!commands.length)
3230
return;
33-
const current = process.cwd();
34-
const workspace = misc_1.getWorkspace();
35-
signale_1.default.info('workspace=%s', workspace);
36-
signale_1.default.info('current=%s', current);
37-
yield execAsync(`cd ${workspace}`);
3831
for (const command of commands) {
3932
yield execAsync(command);
4033
}
41-
yield execAsync(`cd ${current}`);
4234
});
4335
exports.getDiffFiles = () => __awaiter(this, void 0, void 0, function* () {
4436
const workspace = misc_1.getWorkspace();
4537
yield execAsync(`git -C ${workspace} add --all --force`);
46-
yield execAsync(`git -C ${workspace} status --short -uno`);
38+
signale_1.default.info(yield execAsync(`git -C ${workspace} status --short -uno`));
4739
return (yield execAsync(`git -C ${workspace} status --short -uno`)).split(/\r\n|\n/).filter(line => line.match(/^[MDA]\s+/)).map(line => line.replace(/^[MDA]\s+/, ''));
4840
});
4941
const execAsync = (command) => new Promise((resolve, reject) => {

src/utils/command.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,15 @@ export const runBuild = async () => {
1717
const commands = getBuildCommands();
1818
if (!commands.length) return;
1919

20-
const current = process.cwd();
21-
const workspace = getWorkspace();
22-
signale.info('workspace=%s', workspace);
23-
signale.info('current=%s', current);
24-
await execAsync(`cd ${workspace}`);
2520
for (const command of commands) {
2621
await execAsync(command);
2722
}
28-
await execAsync(`cd ${current}`);
2923
};
3024

3125
export const getDiffFiles = async () => {
3226
const workspace = getWorkspace();
3327
await execAsync(`git -C ${workspace} add --all --force`);
34-
await execAsync(`git -C ${workspace} status --short -uno`);
28+
signale.info(await execAsync(`git -C ${workspace} status --short -uno`));
3529
return (await execAsync(`git -C ${workspace} status --short -uno`)).split(/\r\n|\n/).filter(line => line.match(/^[MDA]\s+/)).map(line => line.replace(/^[MDA]\s+/, ''));
3630
};
3731

0 commit comments

Comments
 (0)