-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sh
executable file
·58 lines (48 loc) · 1.23 KB
/
build.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
#!/bin/sh
if [ $# != 2 ] ; then
echo "Usage: ${0} PackageName DaemonVersion"
exit 1;
fi
PACKAGE_NAME="${1:-latest}"
DAEMON_VERSION="${2}"
BRANCH_NAME=`git symbolic-ref --short -q HEAD`
SRC_DIR="Releases/${PACKAGE_NAME}.xcarchive"
DEST_DIR="Releases/${PACKAGE_NAME}"
echo "Current branch: ${BRANCH_NAME}"
echo "Update repository..."
git pull
if [ $? != 0 ] ; then
exit 1
fi
echo "Update Cocoapods..."
pod update --verbose
if [ $? != 0 ] ; then
exit 1
fi
# 0
echo "Update adapter..."
./adapter_encode.sh
if [ $? != 0 ] ; then
exit 1
fi
# 1
echo "Trigger build..."
xcodebuild archive -workspace "XXTExplorer.xcworkspace" -scheme "XXTExplorer-Archive" -archivePath "${DEST_DIR}" | xcpretty --color
if [ $? != 0 ] ; then
exit 1
fi
# 2
echo "Trigger export..."
xcodebuild -exportArchive -archivePath "${SRC_DIR}" -exportPath "${DEST_DIR}" -exportOptionsPlist "DefaultExportOptions.plist" -allowProvisioningUpdates | xcpretty --color
if [ $? != 0 ] ; then
exit 1
fi
# 3
echo "Upload symbols..."
./Libraries/BuglydSYMUploader/dSYMUpload.sh "abe3aa1f98" "d133a6f9-a23a-480c-a47a-e105191fd84c" "com.xxtouch.XXTExplorer" "${DAEMON_VERSION}" "${SRC_DIR}" "${DEST_DIR}" 1
if [ $? != 0 ] ; then
exit 1
fi
# 5
echo "Succeed."
open Releases