-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathmakefile
More file actions
73 lines (56 loc) · 2 KB
/
makefile
File metadata and controls
73 lines (56 loc) · 2 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.PHONY: all setup clean deps build-runner translations hooks ios-pod-update drift-migrations docker-build docker-run test unit-test integration-test fvm-check
fvm-check:
@echo "🔍 Checking FVM"
@if ! command -v fvm >/dev/null 2>&1; then \
echo "❌ FVM is not installed. Please install FVM first:"; \
exit 1; \
fi
@echo "✅ FVM is installed"
@fvm install
all: setup
@echo "✨ All tasks completed!"
setup: fvm-check clean deps build-runner translations hooks ios-pod-update
@echo "🚀 Setup complete!"
clean:
@echo "🧹 Clean and remove pubspec.lock and ios/Podfile.lock"
@fvm flutter clean && rm -f pubspec.lock && rm -f ios/Podfile.lock
deps:
@echo "🏃 Fetch dependencies"
@fvm flutter pub get
build-runner:
@echo "🏗️ Build runner for json_serializable and flutter_gen"
@fvm dart run build_runner build --delete-conflicting-outputs
build-runner-watch:
@echo "🏗️ Build runner for json_serializable and flutter_gen (watch mode)"
@fvm dart run build_runner watch --delete-conflicting-outputs
translations:
@echo "🌐 Generating translations files"
@fvm flutter pub get
hooks:
@CURRENT_HOOKS_PATH=$$(git config --local core.hooksPath); \
if [ "$$CURRENT_HOOKS_PATH" = ".git_hooks/" ]; then \
echo "✅ Git hooks already configured"; \
else \
echo "🔧 Setting up git pre-commit hooks"; \
git config --local core.hooksPath .git_hooks/; \
fi
drift-migrations:
@echo "🔄 Create schema and sum migrations"
fvm dart run drift_dev make-migrations
ios-pod-update:
@echo " Fetching dependencies"
@fvm flutter precache --ios
@cd ios && pod install --repo-update && cd -
ios-sqlite-update:
@echo "🔄 Updating SQLite"
@cd ios && pod update sqlite3 && cd -
docker-build:
@echo "🏗️ Building Docker image"
@ docker build -t bull-mobile .
test: unit-test integration-test
unit-test:
@echo "🏃 running unit tests"
@fvm flutter test test/ --reporter=compact
integration-test:
@echo "🧪 integration tests"
@fvm flutter test integration_test/ --reporter=compact