forked from hpi-studyu/studyu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
melos.yaml
226 lines (198 loc) · 7.04 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
name: studyu-packages
repository: https://github.com/hpi-studyu/studyu
packages:
- app
- designer_v2
- core
- flutter_common
command:
clean:
hooks:
# Clean things very deeply, can be used to establish "pristine checkout" status
pre: >
git clean -x -d -f -q || true
# Additional cleanup lifecycle script, executed when `melos clean` is ran.
post: >
melos exec --flutter --concurrency=3 -- "flutter clean"
scripts:
analyze:
# Exit with success if markdownlint is not installed so it's not a requirement
# (stream redirection has to be POSIX compliant for GH runners)
run: |
melos exec -c 6 -- \
"flutter analyze --fatal-infos ."
if markdownlint -V >/dev/null 2>&1; then
printf "\n\033[1mLinting Markdown files ...\033[0;31m\n\n"
markdownlint --ignore-path '.meta/.markdownlintignore' --config '.meta/.mdlrc' './**/*.md' \
&& printf "\033[0;32mSuccess!\033[0m\n"
else
printf "\n\033[1mCannot lint markdown files since markdownlint is not installed.\033[0m\n\n"
fi
description: |
Run `dart analyze` in all packages, and, if `markdownlint` is installed, lint Markdown files.
- Note: you can also rely on your IDEs Dart Analysis / Issues window.
format:
run: |
melos exec -c 6 -- \
"dart format -l 120 ."
markdownlint --ignore-path '.meta/.markdownlintignore' --config '.meta/.mdlrc' './**/*.md' --fix
description: Format all code and markdown files
fix:
run: |
melos exec -c 6 -- \
"dart fix --apply"
description: Fix auto-fixable lint errors
format:ci:
run: |
melos exec -c 6 -- \
"find . -type f -name '*.dart' ! -name '*.g.dart' ! -path '**/.dart_tool/**' | tr '\n' ' ' | xargs dart format -l 120 --set-exit-if-changed"
description: Format all code without generated files
outdated:
run: |
melos exec -c 6 --fail-fast -- \
"dart pub outdated"
description: Check all outdated dependencies
upgrade:
run: |
melos exec -c 6 --fail-fast -- \
"dart pub upgrade" && melos bootstrap
description: Check all outdated dependencies
test:
run: |
melos exec -c 6 --fail-fast -- \
"flutter test"
description: Run `flutter test` for a specific package.
packageFilters:
dir-exists: test
generate:
run: |
melos exec -c 1 --fail-fast -- \
"flutter pub run build_runner build --delete-conflicting-outputs"
description: Generate files with build_runner
packageFilters:
scope: studyu_core
dev:designer:
run: |
melos exec -c 1 -- \
"flutter run -d chrome --web-port 3001 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_designer_v2
description: Runs designer in Chrome on port 3001 with local env for local development
dev:app:
run: |
melos exec -c 1 -- \
"flutter run --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_app
description: Runs app with local env for local development
build:android:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build apk --no-tree-shake-icons --multidex"
description: Build app for Android.
packageFilters:
dir-exists: android
build:ios:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build ipa --no-codesign --no-tree-shake-icons"
description: Build app for iOS.
packageFilters:
dir-exists: ios
build:web:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons"
description: Build app for Web.
packageFilters:
scope: [studyu_app, studyu_designer_v2]
dir-exists: web
build:web:app:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons"
description: Build app for Web.
packageFilters:
scope: studyu_app
build:web:designer:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons"
description: Build designer for Web.
packageFilters:
scope: studyu_designer
build:web:designer_v2:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons"
description: Build designer_v2 for Web.
packageFilters:
scope: studyu_designer_v2
build:web:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.dev"
description: Build web dev.
packageFilters:
scope: [studyu_app, studyu_designer_v2]
dir-exists: web
build:web:app:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.dev"
description: Build web app dev.
packageFilters:
scope: studyu_app
dir-exists: web
build:web:designer_v2:dev:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.dev"
description: Build web designer_v2 dev.
packageFilters:
scope: studyu_designer_v2
dir-exists: web
build:web:hpi:
run: |
melos exec -c 2 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.hpi"
description: Build web hpi.
packageFilters:
scope: [studyu_app, studyu_designer_v2]
dir-exists: web
build:web:app:hpi:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.hpi"
description: Build app for Docker and self-hosted Supabase instance.
packageFilters:
scope: studyu_app
build:web:designer_v2:hpi:
run: |
melos exec -c 1 --fail-fast -- \
"flutter build web --web-renderer auto --no-tree-shake-icons --dart-define=STUDYU_ENV=.env.hpi"
description: Build designer_v2 for Docker and self-hosted Supabase instance.
packageFilters:
scope: studyu_designer_v2
# Used to test Designer "Try out study" feature, where the designer opens the App using the user auth token from designer
app:web:local:
run: |
melos exec -c 1 -- \
"flutter run lib/main.dart -d chrome --web-port 8080 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_app
description: Runs app in chrome on port 8080 with local env
designer:web:local:
run: |
melos exec -c 1 -- \
"flutter run lib/main.dart -d chrome --web-port 8083 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_designer
description: Runs designer in chrome on port 8083 with local env
designer_v2:web:local:
run: |
melos exec -c 1 -- \
"flutter run lib/main.dart -d chrome --web-port 8081 --dart-define=STUDYU_ENV=.env.local"
packageFilters:
scope: studyu_designer_v2
description: Runs designer in chrome on port 8081 with local env