Skip to content

Commit

Permalink
perf: 优化发版流程
Browse files Browse the repository at this point in the history
  • Loading branch information
HOMEDO\zhangjiayun committed Jul 11, 2022
1 parent 2a13286 commit 02be0f7
Show file tree
Hide file tree
Showing 5 changed files with 4,627 additions and 2,729 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
61 changes: 51 additions & 10 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,63 @@
"github": {
"release": true
},
"npm": {
"allowSameVersion": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name":"conventionalcommits",
"name": "conventionalcommits",
"types": [
{"type": "feat", "section": "功能"},
{"type": "fix", "section": "Bug 修复"},
{"type": "chore", "section": "其他"},
{"type": "docs", "section": "文档更改"},
{"type": "style", "section": "样式"},
{"type": "refactor", "section": "重构"},
{"type": "perf", "section": "性能改进"},
{"type": "test", "section": "测试添加/更正"}
{
"type": "feat",
"section": "新功能[feat]"
},
{
"type": "fix",
"section": "Bug 修复[fix]"
},
{
"type": "chore",
"section": "其他[chore]"
},
{
"type": "docs",
"section": "文档更改[docs]"
},
{
"type": "style",
"section": "样式更改[style]"
},
{
"type": "refactor",
"section": "重构[refactor]"
},
{
"type": "perf",
"section": "性能改进[perf]"
},
{
"type": "test",
"section": "测试添加/更正[test]"
},
{
"type": "revert",
"section": "还原提交[revert]"
},
{
"type": "ignore",
"section": "需要忽略[ignore]",
"hidden": true
},
{
"type": "ci",
"section": "CI发版[ci]"
}
]
},
"infile": "CHANGELOG.md"
"infile": "CHANGELOG.md",
"ignoreRecommendedBump": true
}
}
}
8 changes: 8 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let releaseItConfig = require('./.release-it.json');
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-empty': [2, 'never'], // type 不为空
'type-enum': [2, 'always', releaseItConfig.plugins['@release-it/conventional-changelog'].preset.types.map(item => item.type)],
}
};

0 comments on commit 02be0f7

Please sign in to comment.