1
0
mirror of synced 2025-12-17 02:28:00 +08:00

整体代码优化

This commit is contained in:
王奥斯
2021-11-10 14:13:24 +08:00
parent 5b91c88880
commit a321bf358f
25 changed files with 43 additions and 3131 deletions

View File

@@ -1,14 +1,14 @@
const msgPath = process.env.HUSKY_GIT_PARAMS
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()
// const msgPath = process.env.HUSKY_GIT_PARAMS
// const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()
const commitRE = /^(merge|feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|release|workflow)(\(.+\))?: .{1,50}/
// const commitRE = /^(merge|feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|release|workflow)(\(.+\))?: .{1,50}/
if (!commitRE.test(msg)) {
console.log()
console.error(`
不合法的 commit 消息格式。
请查看 git commit 提交规范:https://gitee.com/OKGENE_1/dashboard/projects/OKGENE_1/vue2.x-template/wikis/OKGENE_1%2Fvue2.x-template?doc_id=1047366&sort_id=3095531
`)
// if (!commitRE.test(msg)) {
// console.log()
// console.error(`
// 不合法的 commit 消息格式。
// 请查看 git commit 提交规范:feat: XXXXX
// `)
process.exit(1)
}
// process.exit(1)
// }