mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-27 09:21:21 +01:00
ddbf0fffb6
The `ReleaseNotes` struct has been replaced with an extension on URL. Release Notes can now be opened on all versions of NNW.
30 lines
709 B
Swift
30 lines
709 B
Swift
//
|
|
// ReleaseNotes.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Stuart Breckenridge on 13/8/20.
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct ReleaseNotes {
|
|
|
|
@available(*, unavailable, message: "Use URL.releaseNotes")
|
|
var url: URL {
|
|
var gitHub = "https://github.com/Ranchero-Software/NetNewsWire/releases/tag/"
|
|
#if os(macOS)
|
|
gitHub += "mac-\(String(describing: versionString()))"
|
|
return URL(string: gitHub)!
|
|
#else
|
|
gitHub += "ios-\(String(describing: versionString()))"
|
|
return URL(string: gitHub)!
|
|
#endif
|
|
}
|
|
|
|
private func versionString() -> String {
|
|
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""
|
|
}
|
|
|
|
}
|