Skip to content

Commit

Permalink
Merge pull request #284 from Eldar2021/el/fix-ci-generate-files
Browse files Browse the repository at this point in the history
Fixed build runner error CI
  • Loading branch information
Eldar2021 authored Dec 21, 2024
2 parents 952e451 + 4387db4 commit 2410dde
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/analyze_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: "Run the build_runner and return an error if files are changed"
run: |
melos run-build-runner-all
melos format-all
./scripts/delete_g_files.sh
melos run run-build-runner-init
dart format . --line-length 120
git diff --exit-code
2 changes: 1 addition & 1 deletion app/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# melos_managed_dependency_overrides: mq_analytics,mq_ci_keys,mq_crashlytics,mq_either,mq_home_repository,mq_quran_repository,mq_remote_config,mq_storage,mq_hatim_repository
# melos_managed_dependency_overrides: mq_analytics,mq_ci_keys,mq_crashlytics,mq_either,mq_hatim_repository,mq_home_repository,mq_quran_repository,mq_remote_config,mq_storage
dependency_overrides:
mq_analytics:
path: ../packages/mq_analytics
Expand Down
8 changes: 8 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ scripts:
run: melos exec --depends-on="build_runner" -- flutter pub run build_runner build --delete-conflicting-outputs
description: "Generate code with build_runner"

run-build-runner-clean:
run: melos exec --depends-on="build_runner" -- flutter packages pub run build_runner clean
description: "Generate code with build_runner"

run-build-runner-init:
run: melos exec --depends-on="build_runner" -- flutter pub run build_runner build
description: "Generate code with build_runner"

# Run My Quran
run-app:
run: cd app && flutter run
Expand Down
7 changes: 7 additions & 0 deletions scripts/delete_g_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

find . -type f -name "*.g.dart" -exec rm -v {} +

find . -type f -name "*.gen.dart" -exec rm -v {} +

echo "All .g.dart files have been deleted."

0 comments on commit 2410dde

Please sign in to comment.