forked from chockenberry/iPulse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_release
executable file
·40 lines (30 loc) · 1002 Bytes
/
build_release
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
#!/bin/sh
current_tools=`xcode-select -print-path`
build_tools="/Applications/Xcode.app/Contents/Developer"
#build_tools="/Applications/Xcode 4.8.app/Contents/Developer"
switch=0
if [ "$current_tools" != "$build_tools" ]; then
switch=1
fi
if [ $switch -ne 0 ]; then
echo "Switching from $current_tools to $build_tools..."
sudo xcode-select -switch "$build_tools"
else
echo "Using $build_tools..."
fi
configuration="Release"
target="Distribution_Iconfactory"
xcodebuild \
-configuration "$configuration" \
-target "$target" \
clean build | tee /tmp/xcodebuild_if.out
if [ $switch -ne 0 ]; then
echo "Restoring $current_tools..."
sudo xcode-select -switch "$current_tools"
fi
echo "=========================================================="
echo "Warnings (Iconfactory)"
echo "----------------------------------------------------------"
grep -i "warning:" /tmp/xcodebuild_if.out
grep -i "note:" /tmp/xcodebuild_if.out
echo "=========================================================="