From c5bc0289faed79e58d78f860674e58a08f1847e8 Mon Sep 17 00:00:00 2001 From: vilasma Date: Thu, 11 Feb 2021 17:36:24 +0530 Subject: [PATCH] Add Carthage to gitignore --- .github/scripts/carthage.sh | 19 +++++++++++++++++++ .gitignore | 3 +-- Example/Cartfile.resolved | 1 + 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 .github/scripts/carthage.sh create mode 100644 Example/Cartfile.resolved diff --git a/.github/scripts/carthage.sh b/.github/scripts/carthage.sh new file mode 100755 index 000000000..7a062998e --- /dev/null +++ b/.github/scripts/carthage.sh @@ -0,0 +1,19 @@ +# carthage.sh +# Usage example: ./carthage.sh build --platform iOS + +set -euo pipefail + +xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) +trap 'rm -f "$xcconfig"' INT TERM HUP EXIT + +# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise +# the build will fail on lipo due to duplicate architectures. + +CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3) +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 + +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 +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 + +export XCODE_XCCONFIG_FILE="$xcconfig" +carthage "$@" diff --git a/.gitignore b/.gitignore index ca09a9eaf..6971a61dc 100644 --- a/.gitignore +++ b/.gitignore @@ -54,8 +54,7 @@ playground.xcworkspace # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - +Example/Carthage/Checkouts Carthage/Build # fastlane diff --git a/Example/Cartfile.resolved b/Example/Cartfile.resolved new file mode 100644 index 000000000..a060d4b41 --- /dev/null +++ b/Example/Cartfile.resolved @@ -0,0 +1 @@ +github "SourcePointUSA/ios-cmp-app" "5.3.5-beta.1"