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

Write Flavour Scripts #22

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
37 changes: 37 additions & 0 deletions scripts/praxis_development.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Please make sure that you have your device selected in the Flutter Device Section before running this script

# Go to root dir from the current scripts dir
echo "<---Going to root directory--->"
cd ..

# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the presentation layer
echo "<---Generating config files for the presentation layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

# Go to data layer (package)
echo "<---Going to data layer--->"
cd praxis_data || return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubhamsinghmutualmobile we need to first generate for praxis_data and then root.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the data layer
echo "<---Generating config files for the data layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

#Go back to root dir
echo "<---Going back to root dir--->"
cd ..

# Generate translation files
echo "<---Generating translation files--->"
flutter gen-l10n --template-arb-file=arb/app_en.arb

# Build development flavor and run it
echo "<---Building development flavor and running it--->"
flutter run --flavor development --target lib/main_development.dart
echo "<---Press any key to exit--->"
read -r
37 changes: 37 additions & 0 deletions scripts/praxis_production.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Please make sure that you have your device selected in the Flutter Device Section before running this script

# Go to root dir from the current scripts dir
echo "<---Going to root directory--->"
cd ..

# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the presentation layer
echo "<---Generating config files for the presentation layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

# Go to data layer (package)
echo "<---Going to data layer--->"
cd praxis_data || return

# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the data layer
echo "<---Generating config files for the data layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

#Go back to root dir
echo "<---Going back to root dir--->"
cd ..

# Generate translation files
echo "<---Generating translation files--->"
flutter gen-l10n --template-arb-file=arb/app_en.arb

# Build production flavor and run it
echo "<---Building production flavor and running it--->"
flutter run --flavor production --target lib/main_production.dart
echo "<---Press any key to exit--->"
read -r
37 changes: 37 additions & 0 deletions scripts/praxis_staging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Please make sure that you have your device selected in the Flutter Device Section before running this script

# Go to root dir from the current scripts dir
echo "<---Going to root directory--->"
cd ..

# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the presentation layer
echo "<---Generating config files for the presentation layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

# Go to data layer (package)
echo "<---Going to data layer--->"
cd praxis_data || return

# Use pub get to fix pubspec.lock error
flutter pub get

# Generate config files for the data layer
echo "<---Generating config files for the data layer--->"
flutter packages pub run build_runner build --delete-conflicting-outputs

#Go back to root dir
echo "<---Going back to root dir--->"
cd ..

# Generate translation files
echo "<---Generating translation files--->"
flutter gen-l10n --template-arb-file=arb/app_en.arb

# Build staging flavor and run it
echo "<---Building staging flavor and running it--->"
flutter run --flavor staging --target lib/main_staging.dart
echo "<---Press any key to exit--->"
read -r