ci: 优化 pre-commit
parent
2793dd8b5e
commit
30c3503b22
10
package.json
10
package.json
|
@ -73,7 +73,7 @@
|
|||
"vitest": "^0.29.7"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "pnpm lint-staged",
|
||||
"pre-commit": "pnpm lint-staged && pnpm test && pnpm build -a",
|
||||
"commit-msg": "pnpm commitlint --edit $1"
|
||||
},
|
||||
"config": {
|
||||
|
@ -82,7 +82,13 @@
|
|||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.(j|t)s": "pnpm lint:fix"
|
||||
"*.{js,json}": [
|
||||
"prettier --write"
|
||||
],
|
||||
"*.ts?(x)": [
|
||||
"eslint",
|
||||
"prettier --parser=typescript --write"
|
||||
]
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
|
|
|
@ -22,13 +22,13 @@ async function main() {
|
|||
|
||||
consola.info('Git add');
|
||||
exec('git add .');
|
||||
exec(`git commit -m "chore: release v${version}"`);
|
||||
exec(`git tag -a v${version} -m "v${version}"`);
|
||||
|
||||
consola.info('Git push');
|
||||
exec(`git commit -m "chore: release v${version}"`);
|
||||
exec('git push');
|
||||
|
||||
consola.info('Git push tag');
|
||||
exec(`git tag -a v${version} -m "v${version}"`);
|
||||
exec(`git push origin v${version}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue