mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-26 23:47:08 +00:00
30 lines
709 B
Swift
30 lines
709 B
Swift
import Foundation
|
|
import Combine
|
|
import Brief
|
|
|
|
class PreviewUpdater: UpdaterProtocol {
|
|
|
|
let update: Release?
|
|
let testBuild = false
|
|
|
|
init(update: Update = .none) {
|
|
switch update {
|
|
case .none:
|
|
self.update = nil
|
|
case .advisory:
|
|
self.update = Release(name: "10.10.10", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Some regular update")
|
|
case .critical:
|
|
self.update = Release(name: "10.10.10", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Critical Security Update")
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
extension PreviewUpdater {
|
|
|
|
enum Update {
|
|
case none, advisory, critical
|
|
}
|
|
|
|
}
|