1
0

feat: 原生 Git hooks 方案,增强版本升迁工作流

This commit is contained in:
2026-05-05 21:58:30 +08:00
parent 5655fc5560
commit a2751eab31
8 changed files with 476 additions and 18 deletions

12
scripts/git-hooks/pre-commit Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -e
ROOT_DIR=$(git rev-parse --show-toplevel)
cd "$ROOT_DIR"
command -v make >/dev/null 2>&1 || {
printf '%s\n' '缺少 make 命令,请先安装 Make 或使用 Git Bash/MINGW64 环境。' >&2
exit 1
}
exec make _hooks-pre-commit