File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ set -e
4
+
3
5
RED=' \033[1;31m'
4
6
GREEN=' \033[1;32m'
5
7
NC=' \033[0m' # No Color
6
8
7
- if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then
9
+ # Get previous checksum
10
+ mkdir -p " Carthage"
11
+ touch " Carthage/cartSum.txt"
12
+ if [ ! -f " Carthage/cartSum.txt" ]; then
13
+ prevSum=" null" ;
14
+ else
15
+ prevSum=` cat Carthage/cartSum.txt` ;
16
+ fi
17
+
18
+ # Get checksum
19
+ cartSum=` { cat Cartfile.resolved; xcrun swift -version; } | md5`
20
+
21
+ if [ " $prevSum " != " $cartSum " ] || [ ! -d " Carthage/Build/iOS" ]; then
8
22
printf " ${RED} Dependencies out of date with cache.${NC} Bootstrapping...\n"
9
23
scripts/bootstrap.sh
10
24
else
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- carthage bootstrap
4
- cp Cartfile.resolved Carthage
3
+ set -e
4
+
5
+ # https://github.com/mapbox/mapbox-navigation-ios/blob/master/scripts/wcarthage.sh
6
+ applyXcode12Workaround () {
7
+ echo " Applying Xcode 12 workaround..."
8
+
9
+ xcconfig=$( mktemp /tmp/static.xcconfig.XXXXXX)
10
+ trap ' rm -f "${xcconfig}"' INT TERM HUP EXIT
11
+
12
+ # For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
13
+ # the build will fail on lipo due to duplicate architectures.
14
+ echo ' EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
15
+ echo ' EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
16
+
17
+ export XCODE_XCCONFIG_FILE=" ${xcconfig} "
18
+ echo " Workaround applied. xcconfig here: ${XCODE_XCCONFIG_FILE} "
19
+ }
20
+
21
+ applyXcode12Workaround
22
+ carthage bootstrap --cache-builds
23
+
24
+ cartSum=` { cat Cartfile.resolved; xcrun swift -version; } | md5`
25
+ echo $cartSum > Carthage/cartSum.txt
You can’t perform that action at this time.
0 commit comments