Skip to content

Commit 6b5b451

Browse files
authored
Merge pull request #69 from norio-nomura/nn-swift-3
Support Swift 3.0
2 parents cd9a165 + c414184 commit 6b5b451

26 files changed

+305
-330
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DEVELOPMENT-SNAPSHOT-2016-03-24-a
1+
3.0

.travis.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,18 @@ matrix:
88
exclude:
99
- script: placeholder # workaround for https://github.com/travis-ci/travis-ci/issues/4681
1010
include:
11-
- script: set -o pipefail && xcodebuild -workspace "$TRAVIS_XCODE_WORKSPACE" -scheme "$TRAVIS_XCODE_SCHEME" test | xcpretty
12-
xcode_scheme: Commandant
13-
os: osx
14-
osx_image: xcode7.3
15-
language: objective-c
16-
env: JOB=Xcode7.3
1711
- script: set -o pipefail && xcodebuild -workspace "$TRAVIS_XCODE_WORKSPACE" -scheme "$TRAVIS_XCODE_SCHEME" test | xcpretty
1812
xcode_scheme: Commandant
1913
os: osx
2014
osx_image: xcode8
2115
language: objective-c
2216
env: JOB=Xcode8
23-
- script: swift build
17+
- script: SWIFT_GIT=`xcrun --find git` swift build
2418
os: osx
25-
osx_image: xcode7.3
19+
osx_image: xcode8
2620
language: objective-c
2721
env: JOB=SPM
28-
install:
29-
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
30-
- script: swift build
22+
- script: swift build && swift test
3123
env: JOB=Linux
3224
sudo: required
3325
dist: trusty

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "antitypical/Result" ~> 2.1.3
1+
github "antitypical/Result" ~> 3.0

Cartfile.private

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
github "jspahrsummers/xcconfigs" ~> 0.9
2-
github "Quick/Quick" ~> 0.9.3
3-
github "Quick/Nimble" "188caeb"
2+
github "Quick/Quick" "swift-3.0"
3+
github "Quick/Nimble" "master"

Cartfile.resolved

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github "Quick/Nimble" "188caeb094bc342614d8a5c706cd8bb9a6c355eb"
2-
github "Quick/Quick" "v0.9.3"
3-
github "antitypical/Result" "2.1.3"
1+
github "Quick/Nimble" "fcc28b23f57b30382e5f182c238674694d7174cb"
2+
github "Quick/Quick" "8f2bc636ecfa2cc20696f62548b38d4ab943e299"
3+
github "antitypical/Result" "3.0.0"
44
github "jspahrsummers/xcconfigs" "0.9"

Carthage/Checkouts/Nimble

Submodule Nimble updated 128 files

Carthage/Checkouts/Quick

Submodule Quick updated 117 files

Commandant.xcodeproj/project.pbxproj

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
6C29EE8B1CA6241B0005DA40 /* Swift3to22.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C29EE8A1CA6241B0005DA40 /* Swift3to22.swift */; };
10+
6C29EE8B1CA6241B0005DA40 /* LinuxSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C29EE8A1CA6241B0005DA40 /* LinuxSupport.swift */; };
1111
CD2ED3411C1E6C5D0076092B /* Argument.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2ED3401C1E6C5D0076092B /* Argument.swift */; };
12-
CD2ED3431C1E6D540076092B /* ArgumentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2ED3421C1E6D540076092B /* ArgumentType.swift */; };
12+
CD2ED3431C1E6D540076092B /* ArgumentProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2ED3421C1E6D540076092B /* ArgumentProtocol.swift */; };
1313
CDFC88361C3C0612003AC8F8 /* CommandSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFC88351C3C0612003AC8F8 /* CommandSpec.swift */; };
1414
D00CCDDF1A20717400109F8C /* Commandant.h in Headers */ = {isa = PBXBuildFile; fileRef = D00CCDDE1A20717400109F8C /* Commandant.h */; settings = {ATTRIBUTES = (Public, ); }; };
1515
D00CCDE51A20717400109F8C /* Commandant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D00CCDD91A20717400109F8C /* Commandant.framework */; };
@@ -36,9 +36,10 @@
3636
/* End PBXContainerItemProxy section */
3737

3838
/* Begin PBXFileReference section */
39-
6C29EE8A1CA6241B0005DA40 /* Swift3to22.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Swift3to22.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
39+
6C29EE8A1CA6241B0005DA40 /* LinuxSupport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = LinuxSupport.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
40+
6CAD549C1D371A4E00A2D031 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LinuxMain.swift; path = Tests/LinuxMain.swift; sourceTree = SOURCE_ROOT; };
4041
CD2ED3401C1E6C5D0076092B /* Argument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Argument.swift; sourceTree = "<group>"; };
41-
CD2ED3421C1E6D540076092B /* ArgumentType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArgumentType.swift; sourceTree = "<group>"; };
42+
CD2ED3421C1E6D540076092B /* ArgumentProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ArgumentProtocol.swift; sourceTree = "<group>"; };
4243
CDFC88351C3C0612003AC8F8 /* CommandSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandSpec.swift; sourceTree = "<group>"; };
4344
D00CCDD91A20717400109F8C /* Commandant.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Commandant.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4445
D00CCDDD1A20717400109F8C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -144,8 +145,10 @@
144145
CDFC88351C3C0612003AC8F8 /* CommandSpec.swift */,
145146
D00CCE281A20741C00109F8C /* OptionSpec.swift */,
146147
D00CCDE91A20717400109F8C /* Supporting Files */,
148+
6CAD549C1D371A4E00A2D031 /* LinuxMain.swift */,
147149
);
148-
path = Tests;
150+
name = Tests;
151+
path = Tests/CommandantTests;
149152
sourceTree = "<group>";
150153
};
151154
D00CCDE91A20717400109F8C /* Supporting Files */ = {
@@ -229,11 +232,11 @@
229232
children = (
230233
CD2ED3401C1E6C5D0076092B /* Argument.swift */,
231234
D00CCE2C1A2075ED00109F8C /* ArgumentParser.swift */,
232-
CD2ED3421C1E6D540076092B /* ArgumentType.swift */,
235+
CD2ED3421C1E6D540076092B /* ArgumentProtocol.swift */,
233236
D00CCE261A20741300109F8C /* Command.swift */,
234237
D00CCE2A1A20748500109F8C /* Errors.swift */,
235238
D00CCE2E1A2075F700109F8C /* Option.swift */,
236-
6C29EE8A1CA6241B0005DA40 /* Swift3to22.swift */,
239+
6C29EE8A1CA6241B0005DA40 /* LinuxSupport.swift */,
237240
D8169D861ACB942D00923FB0 /* Switch.swift */,
238241
);
239242
name = Core;
@@ -360,8 +363,8 @@
360363
files = (
361364
CD2ED3411C1E6C5D0076092B /* Argument.swift in Sources */,
362365
D0BF14FB1A4C8957003147BC /* HelpCommand.swift in Sources */,
363-
6C29EE8B1CA6241B0005DA40 /* Swift3to22.swift in Sources */,
364-
CD2ED3431C1E6D540076092B /* ArgumentType.swift in Sources */,
366+
6C29EE8B1CA6241B0005DA40 /* LinuxSupport.swift in Sources */,
367+
CD2ED3431C1E6D540076092B /* ArgumentProtocol.swift in Sources */,
365368
D00CCE2F1A2075F700109F8C /* Option.swift in Sources */,
366369
D00CCE2B1A20748500109F8C /* Errors.swift in Sources */,
367370
D8169D871ACB942D00923FB0 /* Switch.swift in Sources */,
@@ -398,7 +401,7 @@
398401
ENABLE_TESTABILITY = YES;
399402
MACOSX_DEPLOYMENT_TARGET = 10.9;
400403
ONLY_ACTIVE_ARCH = YES;
401-
SWIFT_VERSION = 2.3;
404+
SWIFT_VERSION = 3.0;
402405
VERSIONING_SYSTEM = "apple-generic";
403406
VERSION_INFO_PREFIX = "";
404407
};
@@ -410,7 +413,7 @@
410413
buildSettings = {
411414
CURRENT_PROJECT_VERSION = 1;
412415
MACOSX_DEPLOYMENT_TARGET = 10.9;
413-
SWIFT_VERSION = 2.3;
416+
SWIFT_VERSION = 3.0;
414417
VERSIONING_SYSTEM = "apple-generic";
415418
VERSION_INFO_PREFIX = "";
416419
};
@@ -457,7 +460,7 @@
457460
"$(DEVELOPER_FRAMEWORKS_DIR)",
458461
"$(inherited)",
459462
);
460-
INFOPLIST_FILE = Tests/Info.plist;
463+
INFOPLIST_FILE = Tests/CommandantTests/Info.plist;
461464
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
462465
PRODUCT_NAME = "$(TARGET_NAME)";
463466
};
@@ -471,7 +474,7 @@
471474
"$(DEVELOPER_FRAMEWORKS_DIR)",
472475
"$(inherited)",
473476
);
474-
INFOPLIST_FILE = Tests/Info.plist;
477+
INFOPLIST_FILE = Tests/CommandantTests/Info.plist;
475478
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
476479
PRODUCT_NAME = "$(TARGET_NAME)";
477480
};
@@ -483,7 +486,7 @@
483486
buildSettings = {
484487
CURRENT_PROJECT_VERSION = 1;
485488
MACOSX_DEPLOYMENT_TARGET = 10.9;
486-
SWIFT_VERSION = 2.3;
489+
SWIFT_VERSION = 3.0;
487490
VERSIONING_SYSTEM = "apple-generic";
488491
VERSION_INFO_PREFIX = "";
489492
};
@@ -513,7 +516,7 @@
513516
"$(DEVELOPER_FRAMEWORKS_DIR)",
514517
"$(inherited)",
515518
);
516-
INFOPLIST_FILE = Tests/Info.plist;
519+
INFOPLIST_FILE = Tests/CommandantTests/Info.plist;
517520
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
518521
PRODUCT_NAME = "$(TARGET_NAME)";
519522
};
@@ -525,7 +528,7 @@
525528
buildSettings = {
526529
CURRENT_PROJECT_VERSION = 1;
527530
MACOSX_DEPLOYMENT_TARGET = 10.9;
528-
SWIFT_VERSION = 2.3;
531+
SWIFT_VERSION = 3.0;
529532
VERSIONING_SYSTEM = "apple-generic";
530533
VERSION_INFO_PREFIX = "";
531534
};
@@ -556,7 +559,7 @@
556559
"$(DEVELOPER_FRAMEWORKS_DIR)",
557560
"$(inherited)",
558561
);
559-
INFOPLIST_FILE = Tests/Info.plist;
562+
INFOPLIST_FILE = Tests/CommandantTests/Info.plist;
560563
PRODUCT_BUNDLE_IDENTIFIER = "org.carthage.$(PRODUCT_NAME:rfc1034identifier)";
561564
PRODUCT_NAME = "$(TARGET_NAME)";
562565
};

Package.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
import PackageDescription
22

33
let package = Package(
4-
name: "Commandant",
5-
dependencies: [
6-
.Package(url: "https://github.com/antitypical/Result.git", "2.0.0")
7-
]
4+
name: "Commandant",
5+
dependencies: {
6+
#if os(macOS)
7+
return [
8+
.Package(url: "https://github.com/antitypical/Result.git", majorVersion: 3, minor: 0),
9+
]
10+
#else
11+
return [
12+
.Package(url: "https://github.com/antitypical/Result.git", majorVersion: 3, minor: 0),
13+
.Package(url: "https://github.com/ikesyo/Nimble", "5.0.0-alpha.30"),
14+
.Package(url: "https://github.com/norio-nomura/Quick", "0.10.0-alpha.30.gm.candidate"),
15+
]
16+
#endif
17+
}()
818
)

0 commit comments

Comments
 (0)