Skip to content

Commit 6b1af62

Browse files
committed
Port project to Xcode 13.
1 parent 50eb1b6 commit 6b1af62

File tree

5 files changed

+25
-18
lines changed

5 files changed

+25
-18
lines changed

CommandLineKit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@
505505
"@executable_path/Frameworks",
506506
"@executable_path/../Frameworks",
507507
);
508-
MACOSX_DEPLOYMENT_TARGET = 10.12;
508+
MACOSX_DEPLOYMENT_TARGET = 11.0;
509509
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.CommandLineKitDemo;
510510
PRODUCT_NAME = "$(TARGET_NAME)";
511511
SWIFT_VERSION = 5.0;
@@ -525,7 +525,7 @@
525525
"@executable_path/Frameworks",
526526
"@executable_path/../Frameworks",
527527
);
528-
MACOSX_DEPLOYMENT_TARGET = 10.12;
528+
MACOSX_DEPLOYMENT_TARGET = 11.0;
529529
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.CommandLineKitDemo;
530530
PRODUCT_NAME = "$(TARGET_NAME)";
531531
SWIFT_VERSION = 5.0;
@@ -660,7 +660,7 @@
660660
"@executable_path/../Frameworks",
661661
"@loader_path/../Frameworks",
662662
);
663-
MACOSX_DEPLOYMENT_TARGET = 10.15;
663+
MACOSX_DEPLOYMENT_TARGET = 11.0;
664664
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.CommandLineKitTests;
665665
PRODUCT_NAME = "$(TARGET_NAME)";
666666
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -699,7 +699,7 @@
699699
"@executable_path/../Frameworks",
700700
"@loader_path/../Frameworks",
701701
);
702-
MACOSX_DEPLOYMENT_TARGET = 10.15;
702+
MACOSX_DEPLOYMENT_TARGET = 11.0;
703703
PRODUCT_BUNDLE_IDENTIFIER = net.objecthub.CommandLineKitTests;
704704
PRODUCT_NAME = "$(TARGET_NAME)";
705705
SWIFT_COMPILATION_MODE = wholemodule;

Package.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.1
1+
// swift-tools-version:5.4
22
//
33
// Package.swift
44
// CommandLineKit
@@ -53,12 +53,14 @@ let package = Package(
5353
],
5454
targets: [
5555
.target(name: "CommandLineKit",
56-
dependencies: []),
57-
.target(name: "CommandLineKitDemo",
58-
dependencies: ["CommandLineKit"],
59-
exclude: []),
56+
dependencies: [],
57+
exclude: ["Info.plist"]),
58+
.executableTarget(name: "CommandLineKitDemo",
59+
dependencies: ["CommandLineKit"],
60+
exclude: ["Info.plist"]),
6061
.testTarget(name: "CommandLineKitTests",
61-
dependencies: ["CommandLineKit"])
62+
dependencies: ["CommandLineKit"],
63+
exclude: ["Info.plist"])
6264
],
6365
swiftLanguageVersions: [.v5]
6466
)

README.md

Lines changed: 4 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.4](https://img.shields.io/badge/Language-Swift%205.4-green.svg?style=flat)](https://developer.apple.com/swift/)
6-
[![IDE: Xcode 12.5](https://img.shields.io/badge/IDE-Xcode%2012.5-orange.svg?style=flat)](https://developer.apple.com/xcode/)
5+
[![Language: Swift 5.5](https://img.shields.io/badge/Language-Swift%205.5-green.svg?style=flat)](https://developer.apple.com/swift/)
6+
[![IDE: Xcode 13](https://img.shields.io/badge/IDE-Xcode%2013-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,8 +231,8 @@ if let ln = LineReader() {
231231

232232
## Requirements
233233

234-
- [Xcode 12.5](https://developer.apple.com/xcode/)
235-
- [Swift 5.4](https://developer.apple.com/swift/)
234+
- [Xcode 13](https://developer.apple.com/xcode/)
235+
- [Swift 5.5](https://developer.apple.com/swift/)
236236
- [Carthage](https://github.com/Carthage/Carthage)
237237
- [Swift Package Manager](https://swift.org/package-manager/)
238238

Sources/CommandLineKitDemo/LinuxMain.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@
3131
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
//
3333

34-
main()
34+
#if os(Linux)
35+
@main struct CommandLineKitDemo {
36+
static func main() {
37+
demo()
38+
}
39+
}
40+
#endif

Sources/CommandLineKitDemo/main.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import Foundation
3535
import CommandLineKit
3636

37-
func main() {
37+
func demo() {
3838
print("Detected terminal: \(Terminal.current)")
3939
print(Terminal.fullColorSupport ? "Full color support" : "No color support")
4040
print(LineReader.supportedByTerminal ? "LineReader support" : "No LineReader support")
@@ -87,5 +87,4 @@ func main() {
8787
}
8888
}
8989

90-
main()
91-
90+
demo()

0 commit comments

Comments
 (0)