-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (45 loc) · 1.45 KB
/
Makefile
File metadata and controls
53 lines (45 loc) · 1.45 KB
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: help dev build release clean test analyze
help: ## 显示帮助信息
@echo "可用命令:"
@echo " make dev - 编译开发包 (Debug)"
@echo " make build - 编译线上包 (Release)"
@echo " make release - 编译线上包 (Release, 别名)"
@echo " make clean - 清理构建产物"
@echo " make test - 运行测试"
@echo " make analyze - 运行静态分析"
@echo " make run - 运行开发版本"
dev: ## 编译开发包
@echo "🔨 正在构建开发包..."
flutter build macos --debug --no-tree-shake-icons
@if [ $$? -eq 0 ]; then \
echo "✅ 开发包构建成功!"; \
echo "📦 应用位置: build/macos/Build/Products/Debug/paste_manager.app"; \
else \
echo "❌ 构建失败"; \
exit 1; \
fi
build: ## 编译线上包
@echo "🔨 正在构建线上包..."
flutter build macos --release --no-tree-shake-icons
@if [ $$? -eq 0 ]; then \
echo "✅ 线上包构建成功!"; \
echo "📦 应用位置: build/macos/Build/Products/Release/paste_manager.app"; \
else \
echo "❌ 构建失败"; \
exit 1; \
fi
release: build ## 线上包别名
clean: ## 清理构建产物
@echo "🧹 清理构建产物..."
flutter clean
rm -rf build/
@echo "✅ 清理完成"
test: ## 运行测试
@echo "🧪 运行测试..."
flutter test
analyze: ## 运行静态分析
@echo "🔍 运行静态分析..."
flutter analyze
run: ## 运行开发版本
@echo "🚀 启动开发版本..."
flutter run -d macos