This commit is contained in:
sophie committed 2026-05-21 11:38:54 +08:00
1 parent a6f35b375c
commit b1613824ce
8 files changed
+200 -12

No files matched your search

+3 -3
View File
@@ -666,7 +666,7 @@ run_ci_migration_check() {
}
install_precommit_hook() {
echo "=== 安装 Git pre-commit Hook ==="
echo "=== 安装 Git Hooks(pre-commit + pre-push)==="
local install_script="${ROOT_DIR}/scripts/install_git_hooks.sh"
if [[ ! -x "${install_script}" ]]; then
echo "未找到可执行脚本: ${install_script}"
@@ -695,7 +695,7 @@ show_help() {
branches或 34 -> 查看本地所有分支及默认分支、远端所有分支及默认分支
dbdrift或 41 -> 检查当前数据库结构与 SQLAlchemy 模型是否一致
migci 或 42 -> 运行 CI 同款迁移一致性检查(空库升级+漂移检测)
hook 或 43 -> 安装 pre-commit Hook(改 models 必须带 migration)
hook 或 43 -> 安装 Git Hooks(models+migration / frontend vue-tsc / push 前 build)
help 或 9 -> 再次显示本帮助
help -> 再次显示本帮助
exit 或 0 -> 退出脚本
@@ -759,7 +759,7 @@ main_loop() {
confirm_and_run "CI同款迁移一致性检查" run_ci_migration_check
;;
43|hook)
confirm_and_run "安装 pre-commit Hook" install_precommit_hook
confirm_and_run "安装 Git Hooks" install_precommit_hook
;;
9|help)
show_help