2026-02-28 15:01:20 +08:00
|
|
|
|
.PHONY: build build-backend build-frontend build-datamanagementd test test-backend test-frontend test-datamanagementd secret-scan
|
2025-12-29 10:03:27 +08:00
|
|
|
|
|
|
|
|
|
|
# 一键编译前后端
|
|
|
|
|
|
build: build-backend build-frontend
|
|
|
|
|
|
|
|
|
|
|
|
# 编译后端(复用 backend/Makefile)
|
|
|
|
|
|
build-backend:
|
|
|
|
|
|
@$(MAKE) -C backend build
|
|
|
|
|
|
|
|
|
|
|
|
# 编译前端(需要已安装依赖)
|
|
|
|
|
|
build-frontend:
|
2026-01-07 16:35:51 +08:00
|
|
|
|
@pnpm --dir frontend run build
|
2026-01-05 13:54:43 +08:00
|
|
|
|
|
2026-02-28 15:01:20 +08:00
|
|
|
|
# 编译 datamanagementd(宿主机数据管理进程)
|
|
|
|
|
|
build-datamanagementd:
|
|
|
|
|
|
@cd datamanagement && go build -o datamanagementd ./cmd/datamanagementd
|
|
|
|
|
|
|
2026-01-05 13:54:43 +08:00
|
|
|
|
# 运行测试(后端 + 前端)
|
|
|
|
|
|
test: test-backend test-frontend
|
|
|
|
|
|
|
|
|
|
|
|
test-backend:
|
|
|
|
|
|
@$(MAKE) -C backend test
|
|
|
|
|
|
|
|
|
|
|
|
test-frontend:
|
2026-01-07 16:35:51 +08:00
|
|
|
|
@pnpm --dir frontend run lint:check
|
|
|
|
|
|
@pnpm --dir frontend run typecheck
|
2026-02-09 09:58:13 +08:00
|
|
|
|
|
2026-02-28 15:01:20 +08:00
|
|
|
|
test-datamanagementd:
|
|
|
|
|
|
@cd datamanagement && go test ./...
|
|
|
|
|
|
|
2026-02-09 09:58:13 +08:00
|
|
|
|
secret-scan:
|
|
|
|
|
|
@python3 tools/secret_scan.py
|