From 824b0cd957fe90c58d3848bb41564d2ec7d7253f Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sat, 21 Dec 2024 20:19:37 +0600 Subject: [PATCH 1/4] Added --- app/pubspec_overrides.yaml | 2 +- melos.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/pubspec_overrides.yaml b/app/pubspec_overrides.yaml index 2206050b..c5c6f2fd 100644 --- a/app/pubspec_overrides.yaml +++ b/app/pubspec_overrides.yaml @@ -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 diff --git a/melos.yaml b/melos.yaml index b7c80acb..117cb884 100644 --- a/melos.yaml +++ b/melos.yaml @@ -74,6 +74,10 @@ 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 My Quran run-app: run: cd app && flutter run From 67a4ec71f484f02c16b278125013e3cf7f1076f8 Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sat, 21 Dec 2024 20:34:07 +0600 Subject: [PATCH 2/4] Added --- .github/workflows/analyze_test.yml | 7 ++++--- melos.yaml | 4 ++++ scripts/delete_g_files.sh | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 scripts/delete_g_files.sh diff --git a/.github/workflows/analyze_test.yml b/.github/workflows/analyze_test.yml index 974c630e..5ebbe707 100644 --- a/.github/workflows/analyze_test.yml +++ b/.github/workflows/analyze_test.yml @@ -2,7 +2,7 @@ name: Analyze code and Unit test on: push: - branches: [main] + branches: [main, el/fix-ci-generate-files] pull_request: branches: [main] @@ -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 diff --git a/melos.yaml b/melos.yaml index 117cb884..0d20f3ca 100644 --- a/melos.yaml +++ b/melos.yaml @@ -78,6 +78,10 @@ scripts: 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 diff --git a/scripts/delete_g_files.sh b/scripts/delete_g_files.sh new file mode 100755 index 00000000..bafa27d3 --- /dev/null +++ b/scripts/delete_g_files.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Proje dizinindeki tüm .g.dart dosyalarını bul ve sil +find . -type f -name "*.g.dart" -exec rm -v {} + + +# İşlem tamamlandı mesajı +echo "All .g.dart files have been deleted." From da74cde684d5d0b35b01e72124c58065484c7853 Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sat, 21 Dec 2024 20:51:04 +0600 Subject: [PATCH 3/4] try 02 --- scripts/delete_g_files.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/delete_g_files.sh b/scripts/delete_g_files.sh index bafa27d3..29dd2ddb 100755 --- a/scripts/delete_g_files.sh +++ b/scripts/delete_g_files.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Proje dizinindeki tüm .g.dart dosyalarını bul ve sil find . -type f -name "*.g.dart" -exec rm -v {} + -# İşlem tamamlandı mesajı +find . -type f -name "*.gen.dart" -exec rm -v {} + + echo "All .g.dart files have been deleted." From 4387db4a2bcb4ac668b41673be5f0c45b6f1b1c7 Mon Sep 17 00:00:00 2001 From: Eldar2021 Date: Sat, 21 Dec 2024 20:58:16 +0600 Subject: [PATCH 4/4] Fixed CI build runner error --- .github/workflows/analyze_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyze_test.yml b/.github/workflows/analyze_test.yml index 5ebbe707..4049a592 100644 --- a/.github/workflows/analyze_test.yml +++ b/.github/workflows/analyze_test.yml @@ -2,7 +2,7 @@ name: Analyze code and Unit test on: push: - branches: [main, el/fix-ci-generate-files] + branches: [main] pull_request: branches: [main]