forked from TalaoDAO/AltMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.sh
executable file
·86 lines (76 loc) · 1.63 KB
/
script.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
function pub {
flutter clean
for d in `ls packages`;
do
(
cd "packages/$d"
flutter clean
flutter pub get
flutter pub upgrade
)
done
flutter pub get
flutter pub upgrade
}
function buildRunner {
echo "build_runner"
for d in `ls packages`;
do
(
echo "$d"
cd "packages/$d"
flutter packages pub run build_runner build --delete-conflicting-outputs
)
done
flutter packages pub run build_runner build --delete-conflicting-outputs
}
function podUpdate {
echo "pod install"
cd ios
rm Podfile.lock
pod install
pod update
cd ..
}
if [[ "$*" == *-runDev* ]];
then
echo "flutter run development"
flutter run --flavor development --target lib/main_development.dart
elif [[ "$*" == *-runstage* ]];
then
echo "flutter run staging"
flutter run --flavor staging --target lib/main_staging.dart
elif [[ "$*" == *-run* ]];
then
echo "flutter run production"
flutter run --flavor production --target lib/main_production.dart
elif [[ "$*" == *-pod* ]];
then
podUpdate
elif [[ "$*" == *-android* ]];
then
pub
buildRunner
echo "deploy android"
echo "Make sure you are in right branch"
flutter build appbundle --flavor "production" --target "lib/main_production.dart"
# cd android
# fastlane deploy
echo "app bundle deployed on internal testing track"
elif [[ "$*" == *-ios* ]];
then
pub
buildRunner
podUpdate
echo "deploy ios"
echo "Make sure you are in right branch"
flutter build ios --release --flavor "production" --target "lib/main_production.dart"
cd ios
fastlane beta
elif [[ "$*" == *-pub* ]];
then
pub
else
pub
buildRunner
fi