Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 6 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
jobs:
unit-test:
run-unit-test:
macos:
xcode: "11.4.1"
xcode: "12.0.0"
steps:
- checkout
- restore_cache:
Expand All @@ -22,14 +22,14 @@ jobs:
name: Run Danager
command: bundle exec danger
- restore_cache:
key: carthage-v2--{{ checksum "Cartfile.resolved" }}
key: carthage-v3--{{ checksum "Cartfile.resolved" }}
- run:
name: Carthage
command: ./bin/bootstrap-if-needed
- save_cache:
key: carthage-v2--{{ checksum "Cartfile.resolved" }}
key: carthage-v3--{{ checksum "Cartfile.resolved" }}
paths:
- "./Carthage"
- "Carthage/"
- run:
name: Execute Tests
command: |
Expand Down Expand Up @@ -61,6 +61,4 @@ workflows:
build-workflow:
jobs:
- swiftlint
- unit-test:
requires:
- swiftlint
- run-unit-test
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"
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"

gem 'fastlane', '~> 2.134'
gem "danger", '~> 6.0'
gem 'cocoapods', '= 1.8.4'
gem 'fastlane', '~> 2.160'
gem "danger", '~> 8.0'
gem 'cocoapods', '~> 1.8.4'
121 changes: 60 additions & 61 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.2)
activesupport (4.2.11.1)
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.2)
algoliasearch (1.27.4)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.307.0)
aws-sdk-core (3.94.0)
aws-partitions (1.380.0)
aws-sdk-core (3.109.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.30.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sdk-kms (1.39.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.63.0)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-s3 (1.83.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.3)
aws-eventstream (~> 1.0, >= 1.0.2)
babosa (1.0.3)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
claide-plugins (0.9.2)
cork
Expand Down Expand Up @@ -61,81 +61,80 @@ GEM
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.3.0)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.7)
cork (0.3.0)
colored2 (~> 3.1)
danger (6.3.2)
danger (8.0.6)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday (>= 0.9.0, < 2.0)
faraday-http-cache (~> 2.0)
git (~> 1.6)
kramdown (~> 2.0)
git (~> 1.7)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
declarative (0.0.10)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.5.1)
digest-crc (0.6.1)
rake (~> 13.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
emoji_regex (1.0.1)
dotenv (2.7.6)
emoji_regex (3.0.0)
escape (0.0.4)
excon (0.73.0)
faraday (0.17.3)
excon (0.76.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-http-cache (2.2.0)
faraday (>= 0.8)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.146.1)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.0)
fastlane (2.162.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.2, < 2.0.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 0.17)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.13.1)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.29.2, < 0.37.0)
google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
jwt (~> 2.1.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.3.0, < 2.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
Expand All @@ -152,7 +151,7 @@ GEM
gh_inspector (1.1.3)
git (1.7.0)
rchardet (~> 1.8)
google-api-client (0.36.4)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
Expand All @@ -163,17 +162,17 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.1)
google-cloud-env (1.3.3)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.0)
google-cloud-storage (1.26.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.29.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.12.0)
googleauth (0.13.1)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -187,21 +186,20 @@ GEM
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.3.0)
jwt (2.1.0)
kramdown (2.2.1)
json (2.3.1)
jwt (2.2.2)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
minitest (5.14.0)
minitest (5.14.2)
molinillo (0.6.6)
multi_json (1.14.1)
multi_xml (0.6.0)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.0)
netrc (0.11.0)
Expand All @@ -210,9 +208,10 @@ GEM
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
os (1.1.0)
os (1.1.1)
plist (3.5.0)
public_suffix (2.0.5)
public_suffix (4.0.6)
rake (13.0.1)
rchardet (1.8.0)
representable (3.0.4)
declarative (< 0.1.0)
Expand All @@ -222,7 +221,7 @@ GEM
rexml (3.2.4)
rouge (2.0.7)
ruby-macho (1.4.0)
rubyzip (1.3.0)
rubyzip (2.3.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
Expand All @@ -241,7 +240,7 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.7.1)
tty-screen (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tzinfo (1.2.7)
Expand All @@ -252,12 +251,12 @@ GEM
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.16.0)
xcodeproj (1.18.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)
Expand All @@ -267,9 +266,9 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.8.4)
danger (~> 6.0)
fastlane (~> 2.134)
cocoapods (~> 1.8.4)
danger (~> 8.0)
fastlane (~> 2.160)

BUNDLED WITH
1.17.2
2.1.4
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
./bin/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 "$@"