-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflutterfire-config.sh
More file actions
executable file
·43 lines (41 loc) · 1.37 KB
/
flutterfire-config.sh
File metadata and controls
executable file
·43 lines (41 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Script to generate Firebase configuration files for different environments/flavors
# Feel free to reuse and adapt this script for your own projects
# https://pub.dev/packages/flutterfire_cli
if [[ $# -eq 0 ]]; then
echo "Error: No environment specified. Use 'dev', 'stg', or 'prod'."
exit 1
fi
case $1 in
dev)
flutterfire config \
--project=rag-dev-8fbc0 \
--out=lib/firebase_options_dev.dart \
--ios-bundle-id=wtf.rag.app.dev \
--ios-out=ios/flavors/development/GoogleService-Info.plist \
--android-package-name=wtf.rag.app.dev \
--android-out=android/app/src/development/google-services.json
;;
stg)
flutterfire config \
--project=rag-stg \
--out=lib/firebase_options_stg.dart \
--ios-bundle-id=wtf.rag.app.stg \
--ios-out=ios/flavors/staging/GoogleService-Info.plist \
--android-package-name=wtf.rag.app.stg \
--android-out=android/app/src/staging/google-services.json
;;
prod)
flutterfire config \
--project=rag-prod \
--out=lib/firebase_options_prod.dart \
--ios-bundle-id=wtf.rag.app \
--ios-out=ios/flavors/main/GoogleService-Info.plist \
--android-package-name=wtf.rag.app \
--android-out=android/app/src/main/google-services.json
;;
*)
echo "Error: Invalid environment specified. Use 'dev', 'stg', or 'prod'."
exit 1
;;
esac