Skip to content

Commit eb971e4

Browse files
committed
Set the version of the HTTP Server based in the project version
Set the version of the HTTP Server based in the project version in the Info.plist
1 parent f043c24 commit eb971e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

XCode/Sources/HttpServer.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import Foundation
99

1010
public class HttpServer: HttpServerIO {
1111

12-
public static let VERSION = "1.4.7"
12+
public static let VERSION: String = {
13+
let bundle = Bundle(for: HttpServer.self)
14+
guard let version = bundle.infoDictionary?["CFBundleShortVersionString"] as? String else { return "Unspecified" }
15+
return version
16+
}()
1317

1418
private let router = HttpRouter()
1519

0 commit comments

Comments
 (0)