build(husky): 优化 commit-msg 钩子脚本
Some checks failed
/ build-and-test (push) Failing after 2m11s
/ playwright (push) Successful in 2m1s
CI/CD Pipeline / build-and-deploy (push) Failing after 3m5s
CI/CD Pipeline / playwright (push) Successful in 4m27s

This commit is contained in:
严浩
2025-10-16 00:13:48 +08:00
parent a005f3f27c
commit 4d721dfb5b

View File

@@ -1,5 +1,13 @@
# 此钩子在 pre-commit 钩子成功完成后,用于检查提交消息。 # 此钩子在 pre-commit 钩子成功完成后,用于检查提交消息。
echo "📝 [Commit-msg] 正在运行 commit-msg 钩子..." echo "📝 [Commit-msg] 正在运行 commit-msg 钩子..."
echo "检查提交消息:$1"
pnpm exec commitlint --edit $1 echo "🟢 检查提交消息:$1"
cat $1
# node -v
echo "🟢 [Commit-msg] Node 版本:$(node -v)"
# pnpm exec commitlint --edit $1
node node_modules/@commitlint/cli/cli.js --edit $1
echo "✅ [Commit-msg] commit-msg 钩子完成!" echo "✅ [Commit-msg] commit-msg 钩子完成!"