-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
executable file
·39 lines (26 loc) · 949 Bytes
/
deploy.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
#!/bin/sh
if [ $# -lt 1 ]
then
echo "Please specify at least one scheme for your project: ./desploy.sh \"WhiteWall\" \"WhiteWall Beta\""
else
echo "---- update build version ----"
agvtool next-version -all
for scheme in "$@"
do
echo "---- remove previous ipa and .dSYM ----"
rm -rf ~/Desktop/"$scheme".app.dSYM.zip ~/Desktop/"$scheme".ipa
echo "---- build .app file ----"
xcodebuild -workspace *.xcworkspace -scheme "$scheme" -configuration "release" -derivedDataPath ~/Desktop
cd ~/Desktop/Build/Products/Release-iphoneos/
echo "---- create .ipa file ----"
xcrun -sdk "iphoneos" PackageApplication -v *.app -o ~/Desktop/"$scheme".ipa
echo "---- create .zip file ----"
zip -r ~/Desktop/"$scheme".app.dSYM.zip *.dSYM
echo "---- removing teporary files ----"
rm -rf ~/Desktop/Build ~/Desktop/ModuleCache ~/Desktop/info.plist
cd -
done
git add .
git commit -m "Increment Build Number"
open ~/Desktop
fi