Build on linux environment (ubuntu 20.4)
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.build
|
||||
.swiftpm
|
||||
.DS_Store
|
||||
bin
|
||||
@@ -37,3 +37,28 @@ extension Date {
|
||||
ProcessInfo.processInfo.systemUptime
|
||||
}
|
||||
}
|
||||
|
||||
#if os(Linux)
|
||||
extension URL {
|
||||
public static func currentDirectory() -> URL {
|
||||
URL(fileURLWithPath: FileManager.default.currentDirectoryPath)
|
||||
}
|
||||
|
||||
public mutating func append(path: String) {
|
||||
appendPathComponent(path)
|
||||
}
|
||||
|
||||
public func appending(path: String) -> URL {
|
||||
appendingPathComponent(path)
|
||||
}
|
||||
|
||||
public mutating func append(queryItems: [URLQueryItem]) {
|
||||
var components = URLComponents(url: self, resolvingAgainstBaseURL: true)
|
||||
components?.queryItems = queryItems
|
||||
if let url = components?.url {
|
||||
self = url
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(Linux)
|
||||
import FoundationNetworking
|
||||
#endif
|
||||
|
||||
|
||||
public enum Method {
|
||||
case `get`
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
#if os(Linux)
|
||||
import FoundationNetworking
|
||||
import FoundationXML
|
||||
#endif
|
||||
|
||||
|
||||
protocol SeibroRequest: Request {
|
||||
var openApiKey: String { get }
|
||||
|
||||
@@ -22,7 +22,7 @@ let package = Package(
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages this package depends on.
|
||||
.target(
|
||||
.executableTarget(
|
||||
name: "KissMeConsole",
|
||||
dependencies: ["KissMe"],
|
||||
path: "Sources"),
|
||||
|
||||
Reference in New Issue
Block a user