This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
/
melos.yaml
57 lines (46 loc) · 2.11 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
name: ubuntu_desktop_installer
packages:
- packages/**
- vendor/ubuntu-desktop-provision/packages/**
ignore:
- synthetic_package
scripts:
# analyze all packages
analyze: >
melos exec -c 1 --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
flutter analyze .
# collect coverage information for all packages
coverage: >
melos exec -c 1 --fail-fast --dir-exists=test --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
flutter test --coverage && melos run coverage:cleanup
# cleanup generated files from coverage
coverage:cleanup: >
melos exec --file-exists=coverage/lcov.info --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
lcov --remove coverage/lcov.info '**/*.g.dart' '**/*.freezed.dart' -o coverage/lcov.info
# format all packages
format: >
melos exec -c 1 --fail-fast --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
"find $MELOS_PACKAGE_PATH -name '*.dart' \
! -name '*.g.dart' \
! -name '*.freezed.dart' \
! -path '*/l10n/*' \
! -path '*/.*/*' \
| xargs dart format --set-exit-if-changed"
# run build_runner to generate code in all packages
generate: >
melos exec -c 1 --fail-fast --depends-on="build_runner" --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
dart run build_runner build --delete-conflicting-outputs
# run gen-l10n to generate localizations in all packages
gen-l10n: >
melos exec -c 1 --fail-fast --file-exists="lib/l10n.dart" --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
flutter gen-l10n
# run integration tests in all packages
integration_test: >
melos exec -c 1 --fail-fast --dir-exists=integration_test --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
flutter test integration_test
# runs "flutter pub <arg(s)>" in all packages
pub: melos exec -c 1 -- flutter pub "$@"
# run tests in all packages
test: >
melos exec -c 1 --fail-fast --dir-exists=test --scope="ubuntu_desktop_installer" --scope="ubuntu_wsl_setup" -- \
flutter test