forked from espresso-cash/espresso-cash-public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (67 loc) · 2.45 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.PHONY: build test
excludeUnused := "{**.g.dart,**.freezed.dart,**.gen.dart,**/generated_plugin_registrant.dart}"
PROD_DEFINITIONS=--dart-define PROD=true --dart-define SENTRY_DSN="${SENTRY_DSN}"
flutter_image_build:
ifndef FLUTTER_VERSION
$(error "FLUTTER_VERSION must be set")
endif
docker build --tag ghcr.io/cryptoplease/flutter:${FLUTTER_VERSION} --build-arg flutter_version=${FLUTTER_VERSION} .
flutter_image_deploy:
ifndef FLUTTER_VERSION
$(error "FLUTTER_VERSION must be set")
endif
docker push ghcr.io/cryptoplease/flutter:${FLUTTER_VERSION}
activate_melos:
dart pub global activate melos
dart_get:
dart pub get
dart_analyze:
dart analyze --fatal-infos .
dart pub run mews_pedantic:metrics analyze --fatal-style --fatal-performance --fatal-warnings lib
dart_test:
dart test
dart_coverage:
dart run coverage:format_coverage -i coverage -o coverage/coverage.lcov --lcov --report-on=lib
remove_from_coverage -f coverage/coverage.lcov -r "\.(g|freezed)\.dart$$"
flutter_get:
flutter pub get
flutter_build:
flutter pub run build_runner build --delete-conflicting-outputs
flutter_generate_test_schemas:
flutter pub run drift_dev schema generate moor_schemas test/generated/
flutter_analyze:
flutter analyze --fatal-infos
flutter pub run mews_pedantic:metrics analyze --fatal-style --fatal-performance --fatal-warnings lib
flutter_check_unused_code:
flutter pub run mews_pedantic:metrics check-unused-code lib --fatal-unused --exclude=$(excludeUnused)
flutter pub run mews_pedantic:metrics check-unused-files lib --fatal-unused --exclude=$(excludeUnused)
flutter_test:
flutter test
flutter_test_e2e:
flutter test integration_test/app_test.dart
firebase_e2e:
cd android \
&& ./gradlew app:assembleAndroidTest \
&& ./gradlew app:assembleDebug -Ptarget=integration_test/app_test.dart
gcloud firebase test android run \
--type instrumentation \
--app build/app/outputs/apk/debug/app-debug.apk \
--test build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--timeout 5m \
--device model=blueline,version=28,orientation=portrait
build_ios:
ifndef BUILD_NUMBER
$(error "BUILD_NUMBER must be set")
endif
ifndef SENTRY_DSN
$(error "SENTRY_DSN must be set")
endif
flutter build ipa --build-number=$(BUILD_NUMBER) $(PROD_DEFINITIONS)
build_android:
ifndef BUILD_NUMBER
$(error "BUILD_NUMBER must be set")
endif
ifndef SENTRY_DSN
$(error "SENTRY_DSN must be set")
endif
flutter build appbundle --build-number=$(BUILD_NUMBER) $(PROD_DEFINITIONS)