Skip to content

Commit

Permalink
tool: enable usePubspecOverrides in Melos repo
Browse files Browse the repository at this point in the history
  • Loading branch information
blaugold authored and Salakar committed Sep 23, 2022
1 parent 75a6fda commit 8615be3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/scripts/install-tools.bat
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CMD /K dart pub global activate --source=path . --executable=melos
CMD /C dart pub global activate --source=path . --executable=melos
REM Workaround an issue when running global executables on Windows for the first time.
CMD /C melos > NUL
melos bootstrap
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.pub/
.dart_tool/
pubspec.lock
pubspec_overrides.yaml
flutter_export_environment.sh

*.iml
Expand Down
19 changes: 12 additions & 7 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,30 @@ command:
branch: main
# Additionally build a changelog at the root of the workspace.
workspaceChangelog: true
bootstrap:
usePubspecOverrides: true

ide:
intellij: true

scripts:
analyze:
run: melos exec -c 1 -- "dart analyze . --fatal-infos"
run: dart analyze . --fatal-infos
exec:
concurrency: 1
description: Run dart analyzer in a specific package.
select-package:
ignore:
- "*monorepo*"
- '*monorepo*'

test:
description: Run tests in a specific package.
# TODO(Salakar) 'dart pub get' is necessary for the 'melos' package as we're using it on itself
run: melos exec --concurrency=1 -- "dart pub get && dart pub run test --reporter expanded"
run: dart test --reporter expanded
exec:
concurrency: 1
select-package:
dir-exists:
- "test/"
- 'test/'
# This tells Melos tests to ignore env variables passed to tests from `melos run test`
# as they could change the behaviour of how tests filter packages.
env:
Expand All @@ -39,7 +44,7 @@ scripts:
format: dart format -o write .

format-check:
run: melos exec flutter format . --set-exit-if-changed
exec: flutter format . --set-exit-if-changed
description: Run `flutter format` checks for all packages.

version: dart run scripts/generate_version.dart
Expand All @@ -50,4 +55,4 @@ scripts:

activate:pub:
description: Activate the published version of melos.
run: dart pub global activate melos
run: dart pub global activate melos --overwrite

0 comments on commit 8615be3

Please sign in to comment.