-
Notifications
You must be signed in to change notification settings - Fork 31
/
release-apps.sh
72 lines (48 loc) · 1.13 KB
/
release-apps.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
#!/bin/sh
#alias rel='sh -x release-apps.sh'
set -e
set -x
perform_npm_actions() {
cd ./packages/react-native-room-kit
git pull --verbose
npm install
cd ./example
npm install
}
release_android() {
cd ./android
bundle install --verbose
bundle exec fastlane distribute_app
}
release_iOS() {
cd ./ios
pod install --verbose
bundle install --verbose
bundle exec fastlane distribute_app
}
perform_git_actions() {
cd ..
while read line; do
if [[ $line =~ ^versionCode.[0-9]+$ ]]; then
buildNumber=$(echo $line | grep -o -E '[0-9]+')
elif [[ $line =~ ^versionName.*$ ]]; then
versionCode=$(echo $line | grep -o -E '[0-9].[0-9].[0-9]+')
fi
done <example/android/app/build.gradle
git add ./example/android/app/build.gradle
git add ./example/ios/Podfile.lock
git add ./example/ios/RNExample/Info.plist
git add ./example/ios/RNExample.xcodeproj/project.pbxproj
git commit -m "released sample app version $versionCode ($buildNumber) ⚛️"
git push --verbose
}
perform_npm_actions
P1=$!
wait $P1
release_android &
P2=$!
release_iOS &
P3=$!
wait $P2 $P3
perform_git_actions
say done