mirror of
https://github.com/yattee/yattee.git
synced 2026-05-12 10:25:02 +00:00
New Release-DeveloperID configuration gates Sparkle behind a SPARKLE compile flag so the App Store Release build stays Sparkle-free. Adds SPUStandardUpdaterController wrapper, Check for Updates menu command, Advanced Settings section with beta channel toggle, and a Ruby script plus GitHub Actions job that signs each release and publishes the appcast to gh-pages for consumption by Sparkle and Homebrew cask.
28 lines
653 B
Swift
28 lines
653 B
Swift
//
|
|
// CheckForUpdatesMenuItem.swift
|
|
// Yattee
|
|
//
|
|
// "Check for Updates…" menu item shown in the macOS app menu for
|
|
// Developer ID builds. Wired to the Sparkle-backed `AppUpdater`.
|
|
//
|
|
// Compiled in only when the `SPARKLE` Swift flag is set (i.e. the
|
|
// `Release-DeveloperID` configuration). See AGENTS.md.
|
|
//
|
|
|
|
#if SPARKLE && os(macOS)
|
|
|
|
import SwiftUI
|
|
|
|
struct CheckForUpdatesMenuItem: View {
|
|
@State private var updater = AppUpdater.shared
|
|
|
|
var body: some View {
|
|
Button(String(localized: "menu.app.checkForUpdates")) {
|
|
updater.checkForUpdates()
|
|
}
|
|
.disabled(!updater.canCheckForUpdates)
|
|
}
|
|
}
|
|
|
|
#endif
|