Skip to content

Commit ba5359c

Browse files
committed
ci(build): 优化构建脚本
1 parent f445c4f commit ba5359c

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

scripts/cm-script.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ import { gitCommit } from "../src/command/git-commit";
22
import { gitCommitScopes, gitCommitTypes } from "../src/shared/config";
33

44
async function cmv() {
5-
await Promise.all([
6-
gitCommit(gitCommitTypes, gitCommitScopes, {
7-
enableEmoji: false,
8-
}),
9-
]);
5+
try {
6+
await Promise.all([
7+
gitCommit(gitCommitTypes, gitCommitScopes, {
8+
enableEmoji: false,
9+
}),
10+
]);
11+
} catch (error) {
12+
console.warn(error);
13+
}
1014
}
1115

1216
cmv();

scripts/cmv-script.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { gitCommitVerify } from "../src/command/git-commit-verify";
22

33
async function cmv() {
4-
await Promise.all([gitCommitVerify()]);
4+
try {
5+
await Promise.all([gitCommitVerify()]);
6+
} catch (error) {
7+
console.warn(error);
8+
}
59
}
610

711
cmv();

scripts/cup-script.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import { cleanUpDirs } from "../src/shared/config";
22
import { cleanUp } from "./../src/command/cheanup";
33

44
async function cmv() {
5-
await Promise.all([cleanUp(cleanUpDirs)]);
5+
try {
6+
await Promise.all([cleanUp(cleanUpDirs)]);
7+
} catch (error) {
8+
console.warn(error);
9+
}
610
}
711

812
cmv();

scripts/prepare.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { gitInitSimpleHooks } from "../src/command/git-init-hooks";
2+
23
async function prepare() {
3-
await Promise.all([gitInitSimpleHooks(process.cwd())]);
4+
try {
5+
await Promise.all([gitInitSimpleHooks(process.cwd())]);
6+
} catch (error) {
7+
console.warn(error);
8+
}
49
}
510

611
prepare();

0 commit comments

Comments
 (0)