Skip to content

Commit 2c48ce3

Browse files
committed
Ported to Swift 5.1 and Xcode 11.0.
1 parent cc640c3 commit 2c48ce3

File tree

8 files changed

+37
-32
lines changed

8 files changed

+37
-32
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.3.1 (2019-09-23)
4+
- Migrated project to Xcode 11.0
5+
- Ported code to Swift 5.1
6+
37
## 0.3 (2019-03-30)
48
- Migrated library to Xcode 10.2
59
- Ported code to Swift 5

CommandLineKit.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
isa = PBXProject;
277277
attributes = {
278278
LastSwiftUpdateCheck = 0930;
279-
LastUpgradeCheck = 1000;
279+
LastUpgradeCheck = 1100;
280280
ORGANIZATIONNAME = "Matthias Zenger";
281281
TargetAttributes = {
282282
CC7A60E6207A62A5007376A0 = {
@@ -437,6 +437,7 @@
437437
MTL_ENABLE_DEBUG_INFO = YES;
438438
ONLY_ACTIVE_ARCH = YES;
439439
SDKROOT = macosx;
440+
SWIFT_VERSION = 5.0;
440441
};
441442
name = Debug;
442443
};
@@ -484,6 +485,7 @@
484485
MTL_ENABLE_DEBUG_INFO = NO;
485486
SDKROOT = macosx;
486487
SWIFT_COMPILATION_MODE = wholemodule;
488+
SWIFT_VERSION = 5.0;
487489
};
488490
name = Release;
489491
};

CommandLineKit.xcodeproj/xcshareddata/xcschemes/CommandLineKit.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "CCFC2AD2207A636B00EDDADD"
34+
BuildableName = "CommandLineKit.framework"
35+
BlueprintName = "CommandLineKit"
36+
ReferencedContainer = "container:CommandLineKit.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "CCFC2AD2207A636B00EDDADD"
46-
BuildableName = "CommandLineKit.framework"
47-
BlueprintName = "CommandLineKit"
48-
ReferencedContainer = "container:CommandLineKit.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
7068
ReferencedContainer = "container:CommandLineKit.xcodeproj">
7169
</BuildableReference>
7270
</MacroExpansion>
73-
<AdditionalOptions>
74-
</AdditionalOptions>
7571
</LaunchAction>
7672
<ProfileAction
7773
buildConfiguration = "Release"

CommandLineKit.xcodeproj/xcshareddata/xcschemes/CommandLineKitDemo.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1000"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:CommandLineKit.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -68,8 +66,6 @@
6866
isEnabled = "YES">
6967
</EnvironmentVariable>
7068
</EnvironmentVariables>
71-
<AdditionalOptions>
72-
</AdditionalOptions>
7369
</LaunchAction>
7470
<ProfileAction
7571
buildConfiguration = "Release"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2018 Google LLC
1+
Copyright © 2018-2019 Google LLC
22
Copyright © 2017 Andy Best <andybest.net at gmail dot com>
33
Copyright © 2010-2014 Salvatore Sanfilippo <antirez at gmail dot com>
44
Copyright © 2010-2013 Pieter Noordhuis <pcnoordhuis at gmail dot com>

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.0
1+
// swift-tools-version:5.1
22
//
33
// Package.swift
44
// CommandLineKit

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[![Platform: macOS](https://img.shields.io/badge/Platform-macOS-blue.svg?style=flat)](https://developer.apple.com/osx/)
44
[![Platform: Linux](https://img.shields.io/badge/Platform-Linux-blue.svg?style=flat)](https://www.ubuntu.com/)
5-
[![Language: Swift 5](https://img.shields.io/badge/Language-Swift%205-green.svg?style=flat)](https://developer.apple.com/swift/)
6-
[![IDE: Xcode 10.2](https://img.shields.io/badge/IDE-Xcode%2010.2-orange.svg?style=flat)](https://developer.apple.com/xcode/)
5+
[![Language: Swift 5.1](https://img.shields.io/badge/Language-Swift%205.1-green.svg?style=flat)](https://developer.apple.com/swift/)
6+
[![IDE: Xcode 11.0](https://img.shields.io/badge/IDE-Xcode%2011.0-orange.svg?style=flat)](https://developer.apple.com/xcode/)
77
[![Carthage: compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
88
[![License: BSD](https://img.shields.io/badge/License-BSD-lightgrey.svg?style=flat)](https://developers.google.com/open-source/licenses/bsd)
99

@@ -231,7 +231,13 @@ if let ln = LineReader() {
231231

232232
## Requirements
233233

234-
- [Xcode 10.2](https://developer.apple.com/xcode/)
235-
- [Swift 5](https://developer.apple.com/swift/)
234+
- [Xcode 11.0](https://developer.apple.com/xcode/)
235+
- [Swift 5.1](https://developer.apple.com/swift/)
236236
- [Carthage](https://github.com/Carthage/Carthage)
237237
- [Swift Package Manager](https://swift.org/package-manager/)
238+
239+
## Copyright
240+
241+
Author: Matthias Zenger (<matthias@objecthub.net>)
242+
Copyright © 2018-2019 Google LLC.
243+
_Please note: This is not an official Google product._

Sources/CommandLineKit/Flag.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ public final class Option: Flag {
108108
}
109109

110110
/// Initializes an option without parsing callback.
111-
public override convenience init(shortName: Character?,
112-
longName: String?,
113-
description: String) {
114-
self.init(shortName: shortName, longName: longName, description: description, notify: {})
111+
public override init(shortName: Character?,
112+
longName: String?,
113+
description: String) {
114+
self.notify = {}
115+
super.init(shortName: shortName, longName: longName, description: description)
115116
}
116117

117118
/// Returns true

0 commit comments

Comments
 (0)