Skip to content

Commit c82e57f

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 * Update the CHANGELOG
1 parent f043c24 commit c82e57f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ All notable changes to this project will be documented in this file. Changes not
2020

2121
## Added
2222

23-
- Add the `trailing_whitespace` rule in Swiftlint and autocorrect all the source files. ([#416](https://github.com/httpswift/swifter/pull/416)) by [@Vkt0r](https://github.com/Vkt0r)
23+
- Add the `trailing_whitespace` rule in Swiftlint and autocorrect all the source files. ([#421](https://github.com/httpswift/swifter/pull/421)) by [@Vkt0r](https://github.com/Vkt0r)
24+
25+
## Changed
26+
27+
- Set the version of the HTTP Server based in the project version in the **Info.plist**. ([#416](https://github.com/httpswift/swifter/pull/416)) by [@Vkt0r](https://github.com/Vkt0r)
2428

2529
# [1.4.7]
2630

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)