Skip to content

Commit 4a97f4b

Browse files
authored
Swift 5 (pointfreeco#200)
* Fix * Swift 5 * Xcodegen * Deprecation * tv * circle * Bump * Scope XcodeGen requirement to development * Update gitignore * Fix? * More commenting out * More CircleCI shenans
1 parent 74f5211 commit 4a97f4b

19 files changed

+117
-390
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
build:
55
macos:
6-
xcode: "10.1.0"
6+
xcode: "10.2.0"
77

88
steps:
99
- checkout

.gitignore

+64-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,70 @@
1-
.DS_Store
2-
/.build
3-
/Packages
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData/
48

5-
# Xcode per-user config
6-
*.mode1
9+
## Various settings
10+
*.pbxuser
11+
!default.pbxuser
712
*.mode1v3
13+
!default.mode1v3
814
*.mode2v3
9-
*.perspective
15+
!default.mode2v3
1016
*.perspectivev3
11-
*.pbxuser
12-
xcuserdata
17+
!default.perspectivev3
18+
xcuserdata/
19+
20+
## Other
21+
*.moved-aside
1322
*.xccheckout
1423
*.xcscmblueprint
24+
25+
## Obj-C/Swift specific
26+
*.hmap
27+
*.ipa
28+
*.dSYM.zip
29+
*.dSYM
30+
31+
## Playgrounds
32+
timeline.xctimeline
33+
playground.xcworkspace
34+
35+
# Swift Package Manager
36+
#
37+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
38+
# Packages/
39+
# Package.pins
40+
.build/
41+
Package.resolved
42+
43+
# CocoaPods
44+
#
45+
# We recommend against adding the Pods directory to your .gitignore. However
46+
# you should judge for yourself, the pros and cons are mentioned at:
47+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
48+
#
49+
# Pods/
50+
51+
# Carthage
52+
#
53+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
54+
# Carthage/Checkouts
55+
56+
Carthage/Build
57+
58+
# fastlane
59+
#
60+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
61+
# screenshots whenever they are needed.
62+
# For more information about the recommended setup visit:
63+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
64+
65+
fastlane/report.xml
66+
fastlane/Preview.html
67+
fastlane/screenshots
68+
fastlane/test_output
69+
70+
.DS_Store

.swift-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.1
1+
swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM swift:4.2
1+
FROM norionomura/swift:swift-5.0-branch
22

33
WORKDIR /package
44

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Point-Free, Inc.
3+
Copyright (c) 2019 Point-Free, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
xcodeproj:
2-
swift run xcodegen
2+
PF_DEVELOP=1 swift run xcodegen
33

44
test-linux:
55
docker build --tag snapshot-testing . \
@@ -15,7 +15,7 @@ test-ios:
1515
set -o pipefail && \
1616
xcodebuild test \
1717
-scheme SnapshotTesting_iOS \
18-
-destination platform="iOS Simulator,name=iPhone XR,OS=12.1" \
18+
-destination platform="iOS Simulator,name=iPhone ,OS=12.2" \
1919

2020
test-swift:
2121
swift test
@@ -24,6 +24,6 @@ test-tvos:
2424
set -o pipefail && \
2525
xcodebuild test \
2626
-scheme SnapshotTesting_tvOS \
27-
-destination platform="tvOS Simulator,name=Apple TV 4K,OS=12.1" \
27+
-destination platform="tvOS Simulator,name=Apple TV 4K,OS=12.2" \
2828

2929
test-all: test-linux test-macos test-ios

Package.resolved

-97
This file was deleted.

Package.swift

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// swift-tools-version:4.2
2-
1+
// swift-tools-version:5.0
2+
import Foundation
33
import PackageDescription
44

55
let package = Package(
@@ -9,9 +9,6 @@ let package = Package(
99
name: "SnapshotTesting",
1010
targets: ["SnapshotTesting"]),
1111
],
12-
dependencies: [
13-
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.2.0"),
14-
],
1512
targets: [
1613
.target(
1714
name: "SnapshotTesting",
@@ -21,3 +18,11 @@ let package = Package(
2118
dependencies: ["SnapshotTesting"]),
2219
]
2320
)
21+
22+
if ProcessInfo.processInfo.environment.keys.contains("PF_DEVELOP") {
23+
package.dependencies.append(
24+
contentsOf: [
25+
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.3.0"),
26+
]
27+
)
28+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 📸 SnapshotTesting
22

3-
[![Swift 4.2](https://img.shields.io/badge/swift-4.2-ED523F.svg?style=flat)](https://swift.org/download/) [![iOS/macOS/tvOS CI](https://img.shields.io/circleci/project/github/pointfreeco/swift-snapshot-testing/master.svg?label=ios/macos/tvos)](https://circleci.com/gh/pointfreeco/swift-snapshot-testing) [![Linux CI](https://img.shields.io/travis/pointfreeco/swift-snapshot-testing/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-snapshot-testing) [![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco)
3+
[![Swift 5](https://img.shields.io/badge/swift-5-ED523F.svg?style=flat)](https://swift.org/download/) [![iOS/macOS/tvOS CI](https://img.shields.io/circleci/project/github/pointfreeco/swift-snapshot-testing/master.svg?label=ios/macos/tvos)](https://circleci.com/gh/pointfreeco/swift-snapshot-testing) [![Linux CI](https://img.shields.io/travis/pointfreeco/swift-snapshot-testing/master.svg?label=linux)](https://travis-ci.org/pointfreeco/swift-snapshot-testing) [![@pointfreeco](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/pointfreeco)
44

55
Delightful Swift snapshot testing.
66

SnapshotTesting.xcodeproj/project.pbxproj

+12
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@
615615
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-iOS";
616616
PRODUCT_NAME = SnapshotTestingTests;
617617
SDKROOT = iphoneos;
618+
SWIFT_VERSION = 5.0;
618619
TARGETED_DEVICE_FAMILY = "1,2";
619620
};
620621
name = Debug;
@@ -628,6 +629,7 @@
628629
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-tvOS";
629630
PRODUCT_NAME = SnapshotTestingTests;
630631
SDKROOT = appletvos;
632+
SWIFT_VERSION = 5.0;
631633
TARGETED_DEVICE_FAMILY = 3;
632634
};
633635
name = Debug;
@@ -641,6 +643,7 @@
641643
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-iOS";
642644
PRODUCT_NAME = SnapshotTestingTests;
643645
SDKROOT = iphoneos;
646+
SWIFT_VERSION = 5.0;
644647
TARGETED_DEVICE_FAMILY = "1,2";
645648
};
646649
name = Release;
@@ -664,6 +667,7 @@
664667
PRODUCT_NAME = SnapshotTesting;
665668
SDKROOT = macosx;
666669
SKIP_INSTALL = YES;
670+
SWIFT_VERSION = 5.0;
667671
VERSIONING_SYSTEM = "apple-generic";
668672
};
669673
name = Debug;
@@ -678,6 +682,7 @@
678682
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-macOS";
679683
PRODUCT_NAME = SnapshotTestingTests;
680684
SDKROOT = macosx;
685+
SWIFT_VERSION = 5.0;
681686
};
682687
name = Debug;
683688
};
@@ -700,6 +705,7 @@
700705
PRODUCT_NAME = SnapshotTesting;
701706
SDKROOT = macosx;
702707
SKIP_INSTALL = YES;
708+
SWIFT_VERSION = 5.0;
703709
VERSIONING_SYSTEM = "apple-generic";
704710
};
705711
name = Release;
@@ -775,6 +781,7 @@
775781
PRODUCT_NAME = SnapshotTesting;
776782
SDKROOT = iphoneos;
777783
SKIP_INSTALL = YES;
784+
SWIFT_VERSION = 5.0;
778785
TARGETED_DEVICE_FAMILY = "1,2";
779786
VERSIONING_SYSTEM = "apple-generic";
780787
};
@@ -798,6 +805,7 @@
798805
PRODUCT_NAME = SnapshotTesting;
799806
SDKROOT = iphoneos;
800807
SKIP_INSTALL = YES;
808+
SWIFT_VERSION = 5.0;
801809
TARGETED_DEVICE_FAMILY = "1,2";
802810
VERSIONING_SYSTEM = "apple-generic";
803811
};
@@ -821,6 +829,7 @@
821829
PRODUCT_NAME = SnapshotTesting;
822830
SDKROOT = appletvos;
823831
SKIP_INSTALL = YES;
832+
SWIFT_VERSION = 5.0;
824833
TARGETED_DEVICE_FAMILY = 3;
825834
VERSIONING_SYSTEM = "apple-generic";
826835
};
@@ -896,6 +905,7 @@
896905
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-tvOS";
897906
PRODUCT_NAME = SnapshotTestingTests;
898907
SDKROOT = appletvos;
908+
SWIFT_VERSION = 5.0;
899909
TARGETED_DEVICE_FAMILY = 3;
900910
};
901911
name = Release;
@@ -918,6 +928,7 @@
918928
PRODUCT_NAME = SnapshotTesting;
919929
SDKROOT = appletvos;
920930
SKIP_INSTALL = YES;
931+
SWIFT_VERSION = 5.0;
921932
TARGETED_DEVICE_FAMILY = 3;
922933
VERSIONING_SYSTEM = "apple-generic";
923934
};
@@ -933,6 +944,7 @@
933944
PRODUCT_BUNDLE_IDENTIFIER = "co.pointfree.SnapshotTestingTests-macOS";
934945
PRODUCT_NAME = SnapshotTestingTests;
935946
SDKROOT = macosx;
947+
SWIFT_VERSION = 5.0;
936948
};
937949
name = Release;
938950
};

0 commit comments

Comments
 (0)