-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathMakefile
53 lines (42 loc) · 1.33 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: install build test clean dev-deps infra-up infra-down up down
DOCKER_EXEC := podman # podman or docker
# 安装开发依赖
dev-deps:
uv sync
# 基础设施服务
infra-up:
$(DOCKER_EXEC) compose up -d mysql redis
infra-down:
$(DOCKER_EXEC) compose down
# 主要安装命令
install: dev-deps infra-up
@echo "🚀 项目初始化完成!"
@echo "💡 提示:"
@echo "1. 使用 'make up' 启动所有服务"
@echo "2. 使用 'make down' 停止所有服务"
# Docker 相关命令
build:
$(DOCKER_EXEC) compose build
up:
$(DOCKER_EXEC) compose up -d
down:
$(DOCKER_EXEC) compose down -v
# 清理
clean:
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type d -name "*.egg-info" -exec rm -r {} +
find . -type d -name ".pytest_cache" -exec rm -r {} +
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type f -name "*.pyd" -delete
find . -type f -name ".coverage" -delete
find . -type d -name ".coverage*" -exec rm -r {} +
find . -type d -name "htmlcov" -exec rm -r {} +
find . -type d -name "dist" -exec rm -r {} +
find . -type d -name "build" -exec rm -r {} +
find . -type d -name ".eggs" -exec rm -r {} +
update-version:
uv run python scripts/update-version.py
pre-commit-check:
uv run pre-commit run --all-files | cat