chore: 初始化仓库,导入项目基线代码

Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、
Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。
今日开发的培训推送管理改动随后单独提交。
This commit is contained in:
runny committed 2026-11-16 18:12:23 +08:00
commit 7ec21f35b0
5767 files changed
+1436788

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Fast checks on staged files (PR checklist + gofmt). Mirrors app.yml formatting gate.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
# shellcheck source=scripts/git-hooks/common.sh
source "$ROOT/scripts/git-hooks/common.sh"
if hook_skip; then
exit 0
fi
cd "$ROOT"
log_step "pre-commit"
check_whitespace --cached
staged_go=()
while IFS= read -r line; do
[[ -n "$line" ]] && staged_go+=("$line")
done < <(git diff --cached --name-only --diff-filter=ACMR -- '*.go' ':!cli/**' || true)
if [[ ${#staged_go[@]} -gt 0 ]]; then
go_files=()
for f in "${staged_go[@]}"; do
go_files+=("$ROOT/$f")
done
check_gofmt_files write "${go_files[@]}"
if command -v golangci-lint >/dev/null 2>&1; then
# Lint only what differs from HEAD (staged + unstaged in those packages).
run_golangci_if_available HEAD
fi
fi
log_ok "pre-commit passed"