forked from gree/patapata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
203 lines (187 loc) · 6.17 KB
/
melos.yaml
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
name: patapata
packages:
- packages/*
- packages/*/example
scripts:
lint:all:
run: melos run analyze
description: Run all static analysis checks.
analyze:
run: |
melos exec -c 1 -- \
dart analyze . --fatal-infos
description: |
Run `dart analyze` in all packages.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
test:all:
run: |
melos run test --no-select
description: |
Run all tests available.
test:
run: |
melos exec -c 6 --fail-fast -- \
"flutter test --dart-define=IS_TEST=true"
description: Run `flutter test` for a specific package.
packageFilters:
dirExists:
- test
ignore:
- "*web*"
- "*example*"
coverage:
run: |
melos exec -c 1 --fail-fast -- \
"flutter test --coverage --dart-define=IS_TEST=true"
description: Run `flutter test --coverage` for a specific package.
packageFilters:
dirExists:
- test
ignore:
- "*web*"
- "*example*"
build:all:
run: |
melos run build:example_ios --no-select && \
melos run build:example_android --no-select && \
melos run build:example_macos --no-select && \
melos run build:example_web --no-select
description: Build all example apps.
build:example_android:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build apk"
description: Build a specific example app for Android.
packageFilters:
dirExists:
- android
scope: "*example*"
build:example_ios:
run: |
if [ ! -z $(which rbenv) ]; then
eval "$(rbenv init - $(basename $SHELL))"
rbenv shell $(rbenv versions | awk '{ if ($1 == "*") print $2; else print $1; }' | sort -rn | head -n 1)
fi
melos exec -c 6 --fail-fast -- \
"flutter build ios --no-codesign"
description: Build a specific example app for iOS.
packageFilters:
dirExists:
- ios
scope: "*example*"
build:example_macos:
run: |
if [ ! -z $(which rbenv) ]; then
eval "$(rbenv init - $(basename $SHELL))"
rbenv shell $(rbenv versions | awk '{ if ($1 == "*") print $2; else print $1; }' | sort -rn | head -n 1)
fi
melos exec -c 6 --fail-fast -- \
"flutter build macos"
description: |
Build a specific example app for macOS.
packageFilters:
dirExists:
- macos
scope: "*example*"
build:example_web:
run: |
melos exec -c 6 --fail-fast -- \
"flutter build web"
description: |
Build a specific example app for web.
packageFilters:
dirExists:
- web
scope: "*example*"
clean:deep:
run: git clean -x -d -f -q
description: Clean things very deeply, can be used to establish "pristine checkout" status.
qualitycheck:
run: |
melos run clean:deep && \
melos clean && \
melos bootstrap && \
melos run lint:all && \
melos run build:all && \
melos run test:all
description: Run all targets generally expected in CI for a full local quality check.
# Additional cleanup lifecycle script, executed when `melos clean` is run.
postclean: >
melos exec -c 6 -- "flutter clean"
add-license-header:
# If you add here another --ignore flag, add it also to
# "check-license-header".
run: |
addlicense -f header_template.txt \
--ignore "**/*.yml" \
--ignore "**/*.yaml" \
--ignore "**/*.xml" \
--ignore "**/*.g.dart" \
--ignore "**/*.sh" \
--ignore "**/*.html" \
--ignore "**/*.js" \
--ignore "**/*.ts" \
--ignore "**/*.g.h" \
--ignore "**/*.g.m" \
--ignore "**/*.rb" \
--ignore "**/*.txt" \
--ignore "**/*.cmake" \
--ignore "**/doc/**" \
--ignore "**/.dart_tool/**" \
--ignore "**/Runner/MainFlutterWindow.swift" \
--ignore "**/Runner/Runner-Bridging-Header.h" \
--ignore "**/Runner/main.m" \
--ignore "**/runner/main.cpp" \
--ignore "**/runner/flutter_window.cpp" \
--ignore "**/runner/resource.h" \
--ignore "**/FlutterMultiDexApplication.java" \
--ignore "**/GeneratedPluginRegistrant.swift" \
--ignore "**/GeneratedPluginRegistrant.java" \
--ignore "**/GeneratedPluginRegistrant.kotlin" \
--ignore "**/GeneratedPluginRegistrant.m" \
--ignore "**/GeneratedPluginRegistrant.h" \
--ignore "**/Pods/**" \
--ignore "**/flutter/generated_plugin_registrant.h" \
--ignore "**/flutter/generated_plugin_registrant.cc" \
--ignore "**/build/**" \
.
description: Add a license header to all necessary files.
check-license-header:
# If you add here another --ignore flag, add it also to
# "add-license-header".
run: |
addlicense -f header_template.txt \
--check \
--ignore "**/*.yml" \
--ignore "**/*.yaml" \
--ignore "**/*.xml" \
--ignore "**/*.g.dart" \
--ignore "**/*.sh" \
--ignore "**/*.html" \
--ignore "**/*.js" \
--ignore "**/*.ts" \
--ignore "**/*.g.h" \
--ignore "**/*.g.m" \
--ignore "**/*.rb" \
--ignore "**/*.txt" \
--ignore "**/*.cmake" \
--ignore "**/doc/**" \
--ignore "**/.dart_tool/**" \
--ignore "**/Runner/MainFlutterWindow.swift" \
--ignore "**/Runner/Runner-Bridging-Header.h" \
--ignore "**/Runner/main.m" \
--ignore "**/runner/main.cpp" \
--ignore "**/runner/flutter_window.cpp" \
--ignore "**/runner/resource.h" \
--ignore "**/FlutterMultiDexApplication.java" \
--ignore "**/GeneratedPluginRegistrant.swift" \
--ignore "**/GeneratedPluginRegistrant.java" \
--ignore "**/GeneratedPluginRegistrant.kotlin" \
--ignore "**/GeneratedPluginRegistrant.m" \
--ignore "**/GeneratedPluginRegistrant.h" \
--ignore "**/Pods/**" \
--ignore "**/flutter/generated_plugin_registrant.h" \
--ignore "**/flutter/generated_plugin_registrant.cc" \
--ignore "**/build/**" \
.
description: Add a license header to all necessary files.