Skip to content

Commit

Permalink
chore: Bump to use Melos ^5.2.0 (#3107)
Browse files Browse the repository at this point in the history
  • Loading branch information
spydon authored Mar 29, 2024
1 parent cb1e370 commit 5d74e62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
42 changes: 16 additions & 26 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ command:
branch: main
# Generates a link to a prefilled GitHub release creation page.
releaseUrl: true

bootstrap:
environment:
sdk: ">=3.0.0 <4.0.0"
Expand All @@ -25,26 +25,18 @@ command:
dartdoc: ^6.3.0
mocktail: ^1.0.1
test: any

publish:
hooks:
pre: melos devtools-build

scripts:
lint:all:
run: melos run analyze && melos run format
steps:
- analyze
- format
description: Run all static analysis checks.

analyze:
run: |
melos exec -c 1 -- \
flutter analyze --fatal-infos
description: Run `flutter analyze` for all packages.

format:
run: melos exec dart format . --fix
description: Run `dart format` for all packages.

format-check:
run: melos exec dart format . --set-exit-if-changed
description: Run `dart format` checks for all packages.
Expand All @@ -62,16 +54,14 @@ scripts:
description: Run dartdoc checks for all packages.

doc-setup:
run: >
echo Checking python version: &&
python3 --version &&
(python3 -c "import sys; sys.exit(0 if sys.version_info >= (3,8) else 2)" ||
(echo Error: Python 3.8+ is required && exit 1)) &&
echo Installing required python modules: &&
python3 -m pip install -r "$MELOS_ROOT_PATH/doc/_sphinx/requirements.txt" &&
echo Installing dartdoc_json: &&
dart pub global activate dartdoc_json &&
echo Done.
steps:
- "echo Checking python version:"
- 'python3 --version && (python3 -c "import sys; sys.exit(0 if sys.version_info >= (3,8) else 2)" || (echo Error: Python 3.8+ is required && exit 1))'
- "echo Installing required python modules:"
- 'python3 -m pip install -r "$MELOS_ROOT_PATH/doc/_sphinx/requirements.txt"'
- "echo Installing dartdoc_json:"
- "dart pub global activate dartdoc_json"
- "echo Done."
description: Prepares the environment for documentation development.

doc-build:
Expand Down Expand Up @@ -105,9 +95,9 @@ scripts:
description: Run all Flutter tests in this project.

coverage:
run: |
melos exec -- flutter test --coverage &&
melos exec -- genhtml coverage/lcov.info --output-directory=coverage/
steps:
- melos exec -- flutter test --coverage
- melos exec -- genhtml coverage/lcov.info --output-directory=coverage/
packageFilters:
dirExists: test
description: Generate coverage for the selected package.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
melos: ^3.2.0
melos: ^5.2.0

0 comments on commit 5d74e62

Please sign in to comment.