From 19bb8be562c88274c4ea16d26ad1f34144b8a0a1 Mon Sep 17 00:00:00 2001 From: Peter Thomas Horn Date: Wed, 26 Feb 2020 10:33:19 +0100 Subject: [PATCH] Fixes #15: Update for Swift 5.1 toolchain. - Added build targets - Added installation instructions to README - Added library product to package description --- Package.swift | 21 ++++++++++++++++++++- README.md | 9 +++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 10f839a..4d5d7e7 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,4 @@ +// swift-tools-version:4.0 // // Created by Richard Hodgkins on 07/06/2016. // Copyright (c) 2016 Richard Hodgkins. All rights reserved. @@ -6,5 +7,23 @@ import PackageDescription let package = Package( - name: "HTTPStatusCodes" + name: "HTTPStatusCodes", + products: [ + .library(name: "HTTPStatusCodes", targets: ["HTTPStatusCodes"]) + ], + targets: [ + .target( + name: "HTTPStatusCodes", + path: "Sources" + ), + .testTarget( + name: "HTTPStatusCodesTests", + dependencies: ["HTTPStatusCodes"], + path: "Tests/HTTPStatusCodesTests", + sources: [ + "HTTPStatusCodesTests.swift", + "RegressionTests.swift" + ] + ) + ] ) diff --git a/README.md b/README.md index 45e6e31..17e4a46 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,20 @@ If this library is out of date compared to this page please open an issue and I ### Swift versions support +* Swift 5.1 - use version 3.3.2 * Swift 5 - use version 3.3.1 * Swift 4 - use version 3.3.0 * Swift 3 - use version 3.1 * Older versions - use version 3.0 +### Swift Package Manager + +Add this package to the dependencies in your `Package.swift` file: + +```swift +.package(url: "https://github.com/rhodgkins/SwiftHTTPStatusCodes.git", .upToNextMajor(from: "3.0.0")) +``` + ### Carthage `Cartfile`: