-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun-app.sh
56 lines (53 loc) · 1.11 KB
/
run-app.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
prompt_android="Please select mode for android: "
OPTIONS_ANDROID=(
"developmentDebug"
"developmentRelease"
"stagingDebug"
"stagingRelease"
"productionDebug"
"productionRelease"
"quit"
)
if [ "$1" == "android" ]
then
PS3="$prompt_android"
select opt in "${OPTIONS_ANDROID[@]}"; do
if [ "$opt" == "quit" ]
then
break
fi
if [ "$opt" == "" ]
then
echo "Invalid"
else
echo "Mode: $opt"
npx react-native run-android --mode $opt
break
fi
done
fi
prompt_ios="Please select variant for ios: "
OPTIONS_IOS=(
"RNBaseProjectTypeScriptDev"
"RNBaseProjectTypeScriptStg"
"RNBaseProjectTypeScript"
"quit"
)
if [ "$1" == "ios" ]
then
PS3="$prompt_ios"
select opt in "${OPTIONS_IOS[@]}"; do
if [ "$opt" == "quit" ]
then
break
fi
if [ "$opt" == "" ]
then
echo "Invalid"
else
echo "Scheme: $opt"
npx react-native run-ios --scheme "$opt"
break
fi
done
fi