Skip to content

Commit

Permalink
Set the version of the HTTP Server based in the project version
Browse files Browse the repository at this point in the history
Set the version of the HTTP Server based in the project version in the Info.plist
  • Loading branch information
Vkt0r committed Jul 2, 2019
1 parent f043c24 commit eb971e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion XCode/Sources/HttpServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import Foundation

public class HttpServer: HttpServerIO {

public static let VERSION = "1.4.7"
public static let VERSION: String = {
let bundle = Bundle(for: HttpServer.self)
guard let version = bundle.infoDictionary?["CFBundleShortVersionString"] as? String else { return "Unspecified" }
return version
}()

private let router = HttpRouter()

Expand Down

0 comments on commit eb971e4

Please sign in to comment.