Skip to content

Commit

Permalink
Swift 5 (#51)
Browse files Browse the repository at this point in the history
* Swift 5

* Dockerfile

* Fix project.yml

* swiftenv

* Bump

* "Fix" Linux

* Scope XcodeGen to development
  • Loading branch information
stephencelis authored Mar 26, 2019
1 parent ac09f71 commit 4345944
Show file tree
Hide file tree
Showing 15 changed files with 287 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
macos:
xcode: "10.1.0"
xcode: "10.2.0"

steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.1
swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a
2 changes: 1 addition & 1 deletion Carthage/Checkouts/swift-snapshot-testing
Submodule swift-snapshot-testing updated 30 files
+1 −1 .swift-version
+22 −14 Documentation/Available-Snapshot-Strategies.md
+1 −1 Makefile
+90 −1 Package.resolved
+1 −0 Package.swift
+17 −7 README.md
+1 −1 SnapshotTesting.podspec
+524 −524 SnapshotTesting.xcodeproj/project.pbxproj
+5 −5 SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_iOS.xcscheme
+5 −5 SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_macOS.xcscheme
+5 −5 SnapshotTesting.xcodeproj/xcshareddata/xcschemes/SnapshotTesting_tvOS.xcscheme
+108 −7 Sources/SnapshotTesting/AssertSnapshot.swift
+14 −0 Sources/SnapshotTesting/Common/View.swift
+2 −2 Sources/SnapshotTesting/Common/XCTAttachment.swift
+3 −3 Sources/SnapshotTesting/Diffing.swift
+204 −94 Sources/SnapshotTesting/SnapshotTestCase.swift
+38 −22 Sources/SnapshotTesting/Snapshotting.swift
+27 −14 Sources/SnapshotTesting/Snapshotting/NSImage.swift
+1 −1 Sources/SnapshotTesting/Snapshotting/String.swift
+33 −20 Sources/SnapshotTesting/Snapshotting/UIImage.swift
+32 −7 Tests/SnapshotTestingTests/SnapshotTestingTests.swift
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testAssertMultipleSnapshot.1.png
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testAssertMultipleSnapshot.2.png
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testAssertMultipleSnapshot.iPad-image.png
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testAssertMultipleSnapshot.iPhoneSE-image.png
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testTraits.ipad-pro-11-alternative.png
+ Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testTraits.ipad-pro-11.png
+5 −0 Tests/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testTraits.ipad-pro-11.txt
+ ...stingTests/__Snapshots__/SnapshotTestingTests/testTraitsEmbeddedInTabNavigation.ipad-pro-11-alternative.png
+ ...s/SnapshotTestingTests/__Snapshots__/SnapshotTestingTests/testTraitsEmbeddedInTabNavigation.ipad-pro-11.png
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:4.2
FROM norionomura/swift:swift-5.0-branch

WORKDIR /package

Expand Down
2 changes: 1 addition & 1 deletion Html.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Pod::Spec.new do |s|
:tag => s.version
}

s.swift_version = "4.2.1"
s.swift_version = "5.0"

s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.9"
Expand Down
54 changes: 54 additions & 0 deletions Html.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,9 @@
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-tvOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
};
Expand All @@ -1022,7 +1024,9 @@
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -1035,7 +1039,9 @@
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-tvOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
};
Expand All @@ -1055,11 +1061,13 @@
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTesting-iOS";
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand All @@ -1073,7 +1081,9 @@
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-tvOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
};
Expand All @@ -1083,9 +1093,11 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-macOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1105,7 +1117,9 @@
PRODUCT_NAME = Html;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -1121,11 +1135,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.Html-iOS";
PRODUCT_NAME = Html;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand All @@ -1147,7 +1163,9 @@
PRODUCT_NAME = Html;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand All @@ -1173,7 +1191,9 @@
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand All @@ -1186,7 +1206,9 @@
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-tvOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
};
Expand All @@ -1199,6 +1221,7 @@
PRODUCT_NAME = HtmlTests;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
};
name = Debug;
Expand All @@ -1207,10 +1230,12 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-iOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1230,8 +1255,10 @@
PRODUCT_NAME = Html;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
};
Expand All @@ -1253,10 +1280,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTesting-macOS";
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -1265,10 +1294,12 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-iOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1277,10 +1308,12 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-iOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -1354,11 +1387,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.Html-iOS";
PRODUCT_NAME = Html;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand All @@ -1379,8 +1414,10 @@
PRODUCT_NAME = Html;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
VERSIONING_SYSTEM = "apple-generic";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Debug;
};
Expand All @@ -1400,11 +1437,13 @@
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTesting-iOS";
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand All @@ -1414,10 +1453,12 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-iOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1435,10 +1476,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.Html-macOS";
PRODUCT_NAME = Html;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -1452,6 +1495,7 @@
PRODUCT_NAME = HtmlTests;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 4;
};
name = Release;
Expand All @@ -1469,10 +1513,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.Html-macOS";
PRODUCT_NAME = Html;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand All @@ -1495,10 +1541,12 @@
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTesting-macOS";
PRODUCT_NAME = HtmlSnapshotTesting;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down Expand Up @@ -1559,9 +1607,11 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-macOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1571,9 +1621,11 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlTests-macOS";
PRODUCT_NAME = HtmlTests;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1583,9 +1635,11 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COMBINE_HIDPI_IMAGES = YES;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.HtmlSnapshotTestingTests-macOS";
PRODUCT_NAME = HtmlSnapshotTestingTests;
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion HtmlSnapshotTesting.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
:tag => s.version
}

s.swift_version = "4.2.1"
s.swift_version = "5.0"

s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.10"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Brandon Williams
Copyright (c) 2019 Point-Free, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ carthage:
carthage update --no-build --use-submodules

xcodeproj:
swift run xcodegen
PF_DEVELOP=1 swift run xcodegen

test-linux:
docker build --tag html . \
Expand Down
Loading

0 comments on commit 4345944

Please sign in to comment.