Skip to content

Commit

Permalink
ci: verify commit msg
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong committed Jun 15, 2020
1 parent 11795fd commit f0a5fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/verify-commit-msg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()

const commitRE = /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build|v)(\(.+\))?: .{1,50}/

if (!commitRE.test(msg)) {
if (!/^v\d+\.\d+\.\d+/.test(msg) && !commitRE.test(msg)) {
console.log()
console.error(` ${chalk.bgRed.white(' ERROR ')} 无效的提交信息`)
process.exit(1)
Expand Down

0 comments on commit f0a5fec

Please sign in to comment.