Skip to content

Commit 1df9676

Browse files
authored
Merge pull request httpswift#421 from Vkt0r/project-version
Set the version of the HTTP Server based in the project version
2 parents 27f75c6 + 84dda48 commit 1df9676

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

CHANGELOG.md

+5-1
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** for macOS, iOS and tvOS platforms. ([#416](https://github.com/httpswift/swifter/pull/416)) by [@Vkt0r](https://github.com/Vkt0r)
2428

2529
# [1.4.7]
2630

XCode/Sources/HttpServer.swift

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ import Foundation
99

1010
public class HttpServer: HttpServerIO {
1111

12-
public static let VERSION = "1.4.7"
12+
public static let VERSION: String = {
13+
14+
#if os(Linux)
15+
return "1.4.7"
16+
#else
17+
let bundle = Bundle(for: HttpServer.self)
18+
guard let version = bundle.infoDictionary?["CFBundleShortVersionString"] as? String else { return "Unspecified" }
19+
return version
20+
#endif
21+
}()
1322

1423
private let router = HttpRouter()
1524

0 commit comments

Comments
 (0)