feat: add auto-update functionality and release scripts
This commit is contained in:
@@ -6,14 +6,37 @@
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Sparkle
|
||||
|
||||
@main
|
||||
struct notetakerApp: App {
|
||||
private let updaterController: SPUStandardUpdaterController
|
||||
|
||||
init() {
|
||||
updaterController = SPUStandardUpdaterController(updaterDelegate: nil, userDriverDelegate: nil)
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
.frame(minWidth: 800, minHeight: 600)
|
||||
}
|
||||
.windowResizability(.contentSize)
|
||||
.commands {
|
||||
CommandGroup(after: .appInfo) {
|
||||
CheckForUpdatesView(updater: updaterController.updater)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CheckForUpdatesView: View {
|
||||
let updater: SPUUpdater
|
||||
|
||||
var body: some View {
|
||||
Button("Check for Updates...") {
|
||||
updater.checkForUpdates()
|
||||
}
|
||||
.keyboardShortcut("u", modifiers: .command)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user