Files
Krow-workspace/mobile-apps/client-app/flutterfire-config.sh
Achintha Isuru b464699205 feat: Add Firebase configuration for staging and development environments
- Created google-services.json for staging environment.
- Updated firebase.json to include build configurations for dev and staging.
- Added flutterfire-config.sh script to generate Firebase configuration files.
- Modified Xcode project to include GoogleService-Info.plist for staging.
- Created staging.xcscheme for Xcode build configuration.
- Added GoogleService-Info.plist for dev and staging flavors.
- Generated firebase_options_dev.dart and firebase_options_staging.dart for Firebase initialization.
2025-11-17 23:52:37 -05:00

42 lines
1.4 KiB
Bash

#!/bin/bash
# Script to generate Firebase configuration files for different environments/flavors
if [[ $# -eq 0 ]]; then
echo "Error: No environment specified. Use 'dev', 'staging', or 'prod'."
exit 1
fi
case $1 in
dev)
flutterfire config \
--project=krow-workforce-dev \
--out=lib/firebase_options_dev.dart \
--ios-bundle-id=com.krow.app.business.dev \
--ios-out=ios/flavors/dev/GoogleService-Info.plist \
--android-package-name=com.krow.app.business.dev \
--android-out=android/app/src/dev/google-services.json
;;
staging)
flutterfire config \
--project=krow-workforce-staging \
--out=lib/firebase_options_staging.dart \
--ios-bundle-id=com.krow.app.business.staging \
--ios-out=ios/flavors/staging/GoogleService-Info.plist \
--android-package-name=com.krow.app.business.staging \
--android-out=android/app/src/staging/google-services.json
;;
prod)
flutterfire config \
--project=krow-workforce-dev \
--out=lib/firebase_options_dev.dart \
--ios-bundle-id=com.krow.app.business.dev \
--ios-out=ios/flavors/dev/GoogleService-Info.plist \
--android-package-name=com.krow.app.business.dev \
--android-out=android/app/src/dev/google-services.json
;;
*)
echo "Error: Invalid environment specified. Use 'dev', 'staging', or 'prod'."
exit 1
;;
esac