|
@@ -9,7 +9,16 @@ import Foundation
|
|
|
|
|
|
|
|
public class HttpServer: HttpServerIO {
|
|
public class HttpServer: HttpServerIO {
|
|
|
|
|
|
|
|
- public static let VERSION = "1.4.7"
|
|
|
|
|
|
|
+ public static let VERSION: String = {
|
|
|
|
|
+
|
|
|
|
|
+ #if os(Linux)
|
|
|
|
|
+ return "1.4.7"
|
|
|
|
|
+ #else
|
|
|
|
|
+ let bundle = Bundle(for: HttpServer.self)
|
|
|
|
|
+ guard let version = bundle.infoDictionary?["CFBundleShortVersionString"] as? String else { return "Unspecified" }
|
|
|
|
|
+ return version
|
|
|
|
|
+ #endif
|
|
|
|
|
+ }()
|
|
|
|
|
|
|
|
private let router = HttpRouter()
|
|
private let router = HttpRouter()
|
|
|
|
|
|