build: git钩子

This commit is contained in:
LOG1997
2025-12-10 00:10:33 +08:00
parent 80480213b8
commit 45e84db6d1
22 changed files with 121 additions and 10 deletions

12
.husky/pre-push Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# 获取最新的 tag
TAG=$(git describe --tags --abbrev=0 2>/dev/null)
if [ $? -eq 0 ]; then
echo "🏷️ 检查最新的 tag: $TAG"
node .husky/scripts/verifyTagVersion.js $TAG
else
echo "⚠️ 没有找到任何 tag跳过版本校验"
fi