forked from Wei-Shaw/sub2api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 829 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: build build-backend build-frontend build-datamanagementd test test-backend test-frontend test-datamanagementd secret-scan
# 一键编译前后端
build: build-backend build-frontend
# 编译后端(复用 backend/Makefile)
build-backend:
@$(MAKE) -C backend build
# 编译前端(需要已安装依赖)
build-frontend:
@pnpm --dir frontend run build
# 编译 datamanagementd(宿主机数据管理进程)
build-datamanagementd:
@cd datamanagement && go build -o datamanagementd ./cmd/datamanagementd
# 运行测试(后端 + 前端)
test: test-backend test-frontend
test-backend:
@$(MAKE) -C backend test
test-frontend:
@pnpm --dir frontend run lint:check
@pnpm --dir frontend run typecheck
test-datamanagementd:
@cd datamanagement && go test ./...
secret-scan:
@python3 tools/secret_scan.py