Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
unit-test:
macos:
xcode: "11.4.1"
xcode: "12.0.0"
steps:
- checkout
- restore_cache:
Expand Down
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "mxcl/PromiseKit" "6.10.0"
github "PromiseKit/Foundation" "3.3.3"
github "mxcl/PromiseKit" ~> 6.10.0
github "PromiseKit/Foundation" ~> 3.3.3
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "AliSoftware/OHHTTPStubs" "8.0.0"
github "Quick/Quick"
github "Quick/Nimble"
github "Quick/Quick" ~> 3.0.0
github "Quick/Nimble" ~> 9.0.0
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github "AliSoftware/OHHTTPStubs" "8.0.0"
github "PromiseKit/Foundation" "3.3.3"
github "Quick/Nimble" "v8.0.4"
github "Quick/Quick" "v2.2.0"
github "mxcl/PromiseKit" "6.10.0"
github "PromiseKit/Foundation" "3.3.4"
github "Quick/Nimble" "v9.0.0"
github "Quick/Quick" "v3.0.0"
github "mxcl/PromiseKit" "6.13.3"
2 changes: 1 addition & 1 deletion bin/bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

carthage bootstrap --platform ios
./carthage.sh bootstrap --platform ios
cp Cartfile.resolved Carthage
17 changes: 17 additions & 0 deletions bin/carthage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# 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.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to generate the list of architectures here instead of hardcoding it (or at least can you move it to a "constant" variable defined at the top of the file?

Given this needs to be an explicit exclusion list I presume it would break if a new architecture were to be added, which might lead to future maintenance overhead.

Image of Olivier LF Olivier LF

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the comment made by my friend Oliver about avoiding hardcoding, as it's difficult to maintain the code in the long run.

Image of Puneet K Puneet K

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 "$@"