forked from matthiasn/lotti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
215 lines (164 loc) · 4.91 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
IOS_ARCHIVE_PATH = ./build/ios/archive/Runner.xcarchive
IOS_EXPORT_PATH = ./build/ios/export
MACOS_ARCHIVE_PATH = ./build/macos/archive/Runner.xcarchive
MACOS_EXPORT_PATH = ./build/macos/export
.PHONY: test
test:
flutter test --coverage
.PHONY: integration_test
integration_test:
flutter test integration_test
.PHONY: clean
clean:
flutter clean
.PHONY: deps
deps:
flutter pub get
.PHONY: enable_arb_tools
enable_arb_tools:
dart pub global activate arb_utils
.PHONY: sort_arb_files
sort_arb_files: enable_arb_tools
find lib/l10n/ -type f -exec dart pub global run arb_utils:sort -i {} \;
.PHONY: l10n
l10n: sort_arb_files
flutter gen-l10n
@echo "Missing translations:"
@cat missing_translations.txt
.PHONY: doctor
doctor:
flutter doctor
.PHONY: coverage
coverage: test
genhtml coverage/lcov.info -o coverage
open coverage/index.html
.PHONY: check-null-safety
check-null-safety:
flutter pub outdated --mode=null-safety
.PHONY: build_runner
build_runner:
flutter pub run build_runner build --delete-conflicting-outputs
.PHONY: watch
watch: l10n
flutter pub run build_runner watch --delete-conflicting-outputs
.PHONY: migrate_db
migrate_db:
@dart pub get
@echo "Running database migration..."
@tput setaf 1
@echo "Rename drift_schema_v_REPLACE_ME.json when done!!!"
@tput sgr0
dart run drift_dev schema dump lib/database/database.dart drift_schemas/drift_schema_v_REPLACE_ME.json
.PHONY: bundle
bundle:
flutter build bundle
#######################################
.PHONY: ios_build_ipa
ios_build_ipa:
flutter build ipa
.PHONY: ios_build
ios_build: clean_test ios_build_ipa
.PHONY: ios_fastlane_beta
ios_fastlane_beta:
cd ios && fastlane beta && cd ..
.PHONY: ios_fastlane_build
ios_fastlane_build:
cd ios && fastlane do_build && cd ..
.PHONY: ios_fastlane_upload
ios_fastlane_upload:
cd ios && fastlane do_upload && cd ..
.PHONY: ios_fastlane_match
ios_fastlane_match:
cd ios && fastlane match --generate_apple_certs false && cd ..
.PHONY: ios_open
ios_open:
open $(IOS_ARCHIVE_PATH)
.PHONY: ipa
ipa: ios_build
xcodebuild -exportArchive -archivePath $(IOS_ARCHIVE_PATH) \
-exportOptionsPlist ./ios/Runner/exportOptions.plist \
-exportPath $(IOS_EXPORT_PATH) \
-allowProvisioningUpdates
.PHONY: ios_upload
ios_upload:
@xcrun altool --upload-app --type ios -f $(IOS_EXPORT_PATH)/Lotti.ipa \
-u $(APPLEID) -p $(LOTTI_APPSTORE_CONNECT)
.PHONY: ios
ios: ios_build ios_fastlane_build ios_fastlane_upload
.PHONY: macos_build_flutter
macos_build_flutter:
flutter build macos
.PHONY: macos_build
macos_build: clean_test macos_build_flutter
.PHONY: macos_archive
macos_archive:
xcodebuild -workspace ./macos/Runner.xcworkspace \
-config Release -scheme Runner \
-archivePath $(MACOS_ARCHIVE_PATH) archive
.PHONY: macos_pkg
macos_pkg:
xcodebuild -exportArchive -archivePath $(MACOS_ARCHIVE_PATH) \
-exportOptionsPlist ./macos/Runner/exportOptions.plist \
-exportPath $(MACOS_EXPORT_PATH) \
-allowProvisioningUpdates
.PHONY: macos_upload
macos_upload:
@xcrun altool --upload-app --type macos -f $(MACOS_EXPORT_PATH)/Lotti.pkg \
-u $(APPLEID) -p $(LOTTI_APPSTORE_CONNECT)
.PHONY: macos_open
macos_open: macos_build macos_archive
open $(MACOS_ARCHIVE_PATH)
.PHONY: macos_fastlane_build
macos_fastlane_build:
cd macos && fastlane do_build && cd ..
.PHONY: macos_fastlane_upload
macos_fastlane_upload:
cd macos && fastlane do_upload && cd ..
.PHONY: macos_fastlane_match
macos_fastlane_match:
cd macos && fastlane match --generate_apple_certs false && cd ..
.PHONY: macos_fastlane_export
macos_fastlane_export:
cd macos && fastlane do_package && cd ..
.PHONY: macos
macos: macos_build macos_fastlane_build macos_fastlane_upload macos_fastlane_export
.PHONY: macos_export
macos_export: macos_build macos_fastlane_export
.PHONY: macos_testflight_cli
macos_testflight_cli: macos_build macos_archive macos_pkg macos_upload
.PHONY: macos_cli
macos_cli: macos_build macos_archive macos_pkg macos_upload
.PHONY: macos_local
macos_local: macos_build
open ./build/macos/Build/Products/Release/
.PHONY: linux_build
linux_build:
flutter build linux
.PHONY: linux
linux: clean_test linux_build
.PHONY: windows
windows: clean_test
flutter build windows
.PHONY: all
all: ios macos
.PHONY: find_unused
find_unused:
flutter pub run dart_code_metrics:metrics check-unused-files lib
.PHONY: sentry_symbols
sentry_symbols:
flutter packages pub run sentry_dart_plugin
.PHONY: splash
splash:
flutter pub run flutter_native_splash:create
.PHONY: icons
icons:
flutter pub run flutter_launcher_icons:main
.PHONY: viz
viz:
dart pub global run dcdg -o classes.viz.puml -s lib/classes/
PLANTUML_LIMIT_SIZE=12000 plantuml classes.viz.puml
open classes.viz.png
.PHONY: clean_test
clean_test: clean deps l10n build_runner test
.PHONY: clean_integration_test
clean_integration_test: clean deps build_runner integration_test