File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ script:
33
33
- pod install --project-directory=Example
34
34
- xcodebuild build -workspace Example/SDWebImageSwiftUI.xcworkspace -scheme SDWebImageSwiftUIDemo -destination 'name=iPhone 11 Pro Max' -configuration Debug | xcpretty -c
35
35
36
- - carthage update --configuration Debug
37
- - xcodebuild build -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUI' -sdk iphonesimulator -configuration Debug | xcpretty -c
36
+ - ./ carthage.sh update --configuration Debug
37
+ - xcodebuild build -project SDWebImageSwiftUI.xcodeproj -scheme 'SDWebImageSwiftUI' -destination 'name=iPhone 11 Pro Max' -configuration Debug | xcpretty -c
38
38
39
39
- echo Clean DerivedData
40
40
- rm -rf ~/Library/Developer/Xcode/DerivedData/
Original file line number Diff line number Diff line change
1
+ # carthage.sh
2
+ # Usage example: ./carthage.sh build --platform iOS
3
+
4
+ set -euo pipefail
5
+
6
+ xcconfig=$( mktemp /tmp/static.xcconfig.XXXXXX)
7
+ trap ' rm -f "$xcconfig"' INT TERM HUP EXIT
8
+
9
+ # For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
10
+ # the build will fail on lipo due to duplicate architectures.
11
+
12
+ CURRENT_XCODE_VERSION=$( xcodebuild -version | grep " Build version" | cut -d' ' -f3)
13
+ echo " EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
14
+
15
+ echo ' EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
16
+ 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
17
+
18
+ export XCODE_XCCONFIG_FILE=" $xcconfig "
19
+ carthage " $@ "
You can’t perform that action at this time.
0 commit comments