Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the prebuild script #3195

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 16 additions & 33 deletions scripts/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,19 @@ set -e
# debug log
set -x

cd core
flutter pub get && dart run build_runner build --delete-conflicting-outputs

## Install necessary pods
# cd ../ios
# flutter pub get && pod install

cd ../model
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../contact
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../forward
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../rule_filter
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../fcm
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../email_recovery
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ../server_settings
flutter pub get && dart run build_runner build --delete-conflicting-outputs

cd ..
flutter pub get \
&& dart run build_runner build --delete-conflicting-outputs \
&& dart run intl_generator:extract_to_arb --output-dir=./lib/l10n lib/main/localizations/app_localizations.dart \
&& dart run intl_generator:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/main/localizations/app_localizations.dart lib/l10n/intl*.arb
# Add additional modules to the end of this, seperated by space
modules=("core" "model" "contact" "forward" "rule_filter" "fcm" "email_recovery" "server_settings")

for mod in "${modules[@]}"; do
(
cd "$mod"
flutter pub get
dart run build_runner build --delete-conflicting-outputs
)
done

# For the parent module
flutter pub get
dart run build_runner build --delete-conflicting-outputs &&
dart run intl_generator:extract_to_arb --output-dir=./lib/l10n lib/main/localizations/app_localizations.dart &&
dart run intl_generator:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/main/localizations/app_localizations.dart lib/l10n/intl*.arb
Loading