add: adding new clean and configure commands
This commit is contained in:
parent
5ef4f69b59
commit
459786be90
3 changed files with 58 additions and 0 deletions
39
.melos/clean.yaml
Normal file
39
.melos/clean.yaml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
scripts:
|
||||||
|
_: &workflow_scripts
|
||||||
|
clean:
|
||||||
|
run: >
|
||||||
|
melos exec -c 1 --fail-fast -- "
|
||||||
|
rm -rf build .dart_tool .packages .flutter-plugins .flutter-plugins-dependencies .pub-cache .pub .idea coverage doc/api .test_coverage.dart .test_runner.dart &&
|
||||||
|
find . -name '*.g.dart' -delete &&
|
||||||
|
find . -name '*.freezed.dart' -delete &&
|
||||||
|
find . -name '*.mocks.dart' -delete &&
|
||||||
|
find . -name '*.gr.dart' -delete &&
|
||||||
|
find . -name '*.config.dart' -delete &&
|
||||||
|
find . -name '*.hive.dart' -delete &&
|
||||||
|
find . -name '*.chopper.dart' -delete &&
|
||||||
|
find . -name '*.reflectable.dart' -delete &&
|
||||||
|
find . -name '*.injectable.dart' -delete &&
|
||||||
|
find . -name '*.gql.dart' -delete &&
|
||||||
|
find . -name '*.gql.g.dart' -delete &&
|
||||||
|
find . -name '*.iconfig.dart' -delete &&
|
||||||
|
find . -name '*.moor.dart' -delete &&
|
||||||
|
find . -name '*.drift.dart' -delete &&
|
||||||
|
find . -name '*.mapper.dart' -delete &&
|
||||||
|
find . -name '*.ast.gql.dart' -delete &&
|
||||||
|
find . -name '*.req.gql.dart' -delete &&
|
||||||
|
find . -name '*.data.gql.dart' -delete &&
|
||||||
|
find . -name '*.var.gql.dart' -delete &&
|
||||||
|
find . -name '*.jorm.dart' -delete &&
|
||||||
|
find . -name '*.g.aot' -delete &&
|
||||||
|
find . -name '*.g.ddc' -delete &&
|
||||||
|
find . -name '*.g.js' -delete &&
|
||||||
|
find . -name '*.g.js.map' -delete &&
|
||||||
|
find . -name '*.g.part' -delete &&
|
||||||
|
find . -name '*.g.sum' -delete &&
|
||||||
|
find . -name '*.g.txt' -delete &&
|
||||||
|
find . -name 'lcov.info' -delete &&
|
||||||
|
find . -name 'coverage_report' -type d -exec rm -r {} + &&
|
||||||
|
git clean -xdf
|
||||||
|
" &&
|
||||||
|
flutter clean
|
||||||
|
description: Thoroughly clean all build artifacts, generated files, coverage reports, and documentation from the entire repository
|
13
.melos/configure.yaml
Normal file
13
.melos/configure.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
scripts:
|
||||||
|
_: &configure_scripts
|
||||||
|
configure:
|
||||||
|
run: >
|
||||||
|
melos bootstrap &&
|
||||||
|
MELOS_SCOPE="platform_container_generator" melos run generate:custom &&
|
||||||
|
MELOS_SCOPE="package_model,package_exceptions,platform_mocking" melos run generate:dummy:test &&
|
||||||
|
MELOS_SCOPE="platform_container_generator" melos run debug:reflectable &&
|
||||||
|
melos run test &&
|
||||||
|
melos run coverage &&
|
||||||
|
melos run coverage_report &&
|
||||||
|
melos run docs:generate
|
||||||
|
description: Configure the development environment, generate code and dummy tests, run tests, generate coverage, and create API documentation
|
|
@ -68,6 +68,12 @@ scripts:
|
||||||
coverage_report:
|
coverage_report:
|
||||||
run: "melos exec -c 1 --fail-fast -- \" if [ -s coverage\/lcov.info ]; then\n genhtml -o coverage_report coverage\/lcov.info;\n echo 'Coverage report generated successfully.';\nelse\n echo 'No valid coverage data found. Skipping report generation.';\nfi \"\n"
|
run: "melos exec -c 1 --fail-fast -- \" if [ -s coverage\/lcov.info ]; then\n genhtml -o coverage_report coverage\/lcov.info;\n echo 'Coverage report generated successfully.';\nelse\n echo 'No valid coverage data found. Skipping report generation.';\nfi \"\n"
|
||||||
description: "Generate HTML coverage report from LCOV data for each package, if valid data exists"
|
description: "Generate HTML coverage report from LCOV data for each package, if valid data exists"
|
||||||
|
clean:
|
||||||
|
run: "melos exec -c 1 --fail-fast -- \" rm -rf build .dart_tool .packages .flutter-plugins .flutter-plugins-dependencies .pub-cache .pub .idea coverage doc\/api .test_coverage.dart .test_runner.dart && find . -name '*.g.dart' -delete && find . -name '*.freezed.dart' -delete && find . -name '*.mocks.dart' -delete && find . -name '*.gr.dart' -delete && find . -name '*.config.dart' -delete && find . -name '*.hive.dart' -delete && find . -name '*.chopper.dart' -delete && find . -name '*.reflectable.dart' -delete && find . -name '*.injectable.dart' -delete && find . -name '*.gql.dart' -delete && find . -name '*.gql.g.dart' -delete && find . -name '*.iconfig.dart' -delete && find . -name '*.moor.dart' -delete && find . -name '*.drift.dart' -delete && find . -name '*.mapper.dart' -delete && find . -name '*.ast.gql.dart' -delete && find . -name '*.req.gql.dart' -delete && find . -name '*.data.gql.dart' -delete && find . -name '*.var.gql.dart' -delete && find . -name '*.jorm.dart' -delete && find . -name '*.g.aot' -delete && find . -name '*.g.ddc' -delete && find . -name '*.g.js' -delete && find . -name '*.g.js.map' -delete && find . -name '*.g.part' -delete && find . -name '*.g.sum' -delete && find . -name '*.g.txt' -delete && find . -name 'lcov.info' -delete && find . -name 'coverage_report' -type d -exec rm -r {} + && git clean -xdf \" && flutter clean\n"
|
||||||
|
description: "Thoroughly clean all build artifacts, generated files, coverage reports, and documentation from the entire repository"
|
||||||
|
configure:
|
||||||
|
run: "melos bootstrap && MELOS_SCOPE=\"platform_container_generator\" melos run generate:custom && MELOS_SCOPE=\"package_model,package_exceptions,platform_mocking\" melos run generate:dummy:test && MELOS_SCOPE=\"platform_container_generator\" melos run debug:reflectable && melos run test && melos run coverage && melos run coverage_report && melos run docs:generate\n"
|
||||||
|
description: "Configure the development environment, generate code and dummy tests, run tests, generate coverage, and create API documentation"
|
||||||
test:
|
test:
|
||||||
run: melos exec -c 1 --fail-fast -- "dart test"
|
run: melos exec -c 1 --fail-fast -- "dart test"
|
||||||
description: Run tests for all packages
|
description: Run tests for all packages
|
||||||
|
|
Loading…
Reference in a new issue