Skip to content

Commit

Permalink
Merge pull request #167 from Rightpoint/swift-5
Browse files Browse the repository at this point in the history
Swift 5
  • Loading branch information
chrisballinger authored May 22, 2019
2 parents f26ecf4 + 9b1f678 commit d8d93aa
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 133 deletions.
73 changes: 37 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,23 @@
version: 2
version: 2.1

jobs:
test:
macos:
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
shell: /bin/bash --login -eo pipefail
executor: xcode-10
steps:
- run:
name: Set Ruby Version
command: echo "ruby-2.5" > ~/.ruby-version
- checkout
- run:
name: Install CocoaPods Specs Repo
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- run: bundle install
- setup
- run: bundle exec pod repo add-cdn jsDelivr-Specs "https://cdn.jsdelivr.net/cocoa/"
- run: bundle exec pod lib lint --swift-version=4.2 --sources=jsDelivr-Specs
- run: bundle exec pod lib lint --swift-version=5.0 --sources=jsDelivr-Specs
- run:
name: Fastlane Test
command: |
cd Example
bundle exec fastlane test
- run: bundle exec pod lib lint
carthage-build:
macos:
xcode: "10.2.0"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
shell: /bin/bash --login -eo pipefail
executor: xcode-10
steps:
- run:
name: Set Ruby Version
command: echo "ruby-2.5" > ~/.ruby-version
- checkout
- setup
- run:
name: Update homebrew dependencies
command: brew update 1> /dev/null 2> /dev/null
Expand All @@ -48,24 +29,44 @@ jobs:
command: carthage build --no-skip-current && test -d Carthage/Build/iOS/Swiftilities.framework

deploy-to-cocoapods:
executor: xcode-10
steps:
- setup
- run:
name: Fetch CocoaPods Specs
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- run: bundle exec pod trunk push

executors:
xcode-10:
macos:
xcode: "10.2.0"
xcode: "10.2.1"
environment:
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
shell: /bin/bash --login -eo pipefail

commands:
setup:
description: "Shared setup"
steps:
- checkout
- restore-gems

restore-gems:
description: "Restore Ruby Gems"
steps:
- run:
name: Set Ruby Version
command: echo "ruby-2.5" > ~/.ruby-version
- checkout
- run:
name: Install CocoaPods Specs Repo
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- run: bundle install
# Warnings must be ignored on CocoaPods 1.6.1 https://github.com/CocoaPods/CocoaPods/issues/8635
- run: bundle exec pod trunk push --allow-warnings
- restore_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
- run: bundle check || bundle install --path vendor/bundle
- save_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle

workflows:
version: 2
Expand Down
16 changes: 12 additions & 4 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 10 additions & 8 deletions Example/Swiftilities.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -363,24 +363,24 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Raizlabs;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Swiftilities" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -577,6 +577,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -633,6 +634,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -691,7 +693,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "iOS Development";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -709,7 +711,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -729,7 +731,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -745,7 +747,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"

gem 'cocoapods', '~> 1.6.1'
gem 'cocoapods', '~> 1.7.0'
gem 'xcpretty'
gem 'fastlane'
26 changes: 13 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ GEM
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
cocoapods (1.6.1)
cocoapods (1.7.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.1)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
Expand All @@ -30,8 +30,8 @@ GEM
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.1, < 2.0)
cocoapods-core (1.6.1)
xcodeproj (>= 1.8.2, < 2.0)
cocoapods-core (1.7.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
Expand All @@ -58,7 +58,7 @@ GEM
dotenv (2.7.2)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.62.0)
excon (0.64.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
Expand All @@ -67,7 +67,7 @@ GEM
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.120.0)
fastlane (2.123.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand Down Expand Up @@ -153,7 +153,7 @@ GEM
nap (1.1.0)
naturally (2.2.0)
netrc (0.11.0)
os (1.0.0)
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
Expand All @@ -179,18 +179,18 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.6.1)
tty-screen (0.6.5)
tty-screen (0.7.0)
tty-spinner (0.9.0)
tty-cursor (~> 0.6.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.5.0)
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
word_wrap (1.0.0)
xcodeproj (1.8.2)
xcodeproj (1.9.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -205,7 +205,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.6.1)
cocoapods (~> 1.7.0)
fastlane
xcpretty

Expand Down
5 changes: 5 additions & 0 deletions Pod/Classes/HairlineView/HairlineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ open class HairlineView: UIView {
switch axis {
case .horizontal: size.height = thickness
case .vertical: size.width = thickness
#if swift(>=5.0)
@unknown default:
debugPrint("ERROR: Unhandled NSLayoutConstraint.Axis case \(axis)!")
break
#endif
}

return size
Expand Down
Loading

0 comments on commit d8d93aa

Please sign in to comment.