feat: 原生 Git hooks 方案,增强版本升迁工作流
This commit is contained in:
12
scripts/git-hooks/pre-commit
Executable file
12
scripts/git-hooks/pre-commit
Executable 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
|
||||
Reference in New Issue
Block a user