fix(updates): harden Sparkle release metadata

This commit is contained in:
nimbold
2026-06-06 15:54:44 +03:30
parent 6a20250d22
commit 09cea67041
4 changed files with 32 additions and 3 deletions
+16
View File
@@ -2,7 +2,23 @@
.build/
build/
dist/
*.dmg
DerivedData/
.vscode/
*.xcuserdata/
*.xcuserstate
# Local secrets and exported signing keys
.env
.env.*
*.key
*.pem
*.p8
*.p12
*.cer
*.der
*.mobileprovision
sparkle_private_key*
SparklePrivateKey*
private-key*
private_key*
+13 -1
View File
@@ -15,10 +15,16 @@ final class SparkleUpdater: NSObject, ObservableObject, SPUUpdaterDelegate {
}
func checkForUpdates() {
guard controller.updater.canCheckForUpdates else {
isChecking = false
updateStatus = "Update check is already in progress."
return
}
isChecking = true
updateStatus = "Checking for updates..."
foundUpdateItem = nil
controller.updater.checkForUpdatesInBackground()
controller.checkForUpdates(nil)
}
func updater(_ updater: SPUUpdater, didFindValidUpdate item: SUAppcastItem) {
@@ -48,6 +54,12 @@ final class SparkleUpdater: NSObject, ObservableObject, SPUUpdaterDelegate {
self.updateStatus = "Update check failed: \(error.localizedDescription)"
}
}
func updater(_ updater: SPUUpdater, didFinishUpdateCycleFor updateCheck: SPUUpdateCheck, error: Error?) {
DispatchQueue.main.async {
self.isChecking = false
}
}
}
@main
+2 -1
View File
@@ -8,10 +8,11 @@
<item>
<title>Version 0.5.7</title>
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
<sparkle:hardwareRequirements>arm64</sparkle:hardwareRequirements>
<sparkle:releaseNotesLink>https://github.com/nimbold/Firelink/releases/tag/v0.5.7</sparkle:releaseNotesLink>
<pubDate>Sat, 06 Jun 2026 11:36:06 +0000</pubDate>
<enclosure url="https://github.com/nimbold/Firelink/releases/download/v0.5.7/Firelink-0.5.7-mac-arm64.dmg"
sparkle:version="0.5.7"
sparkle:version="22"
sparkle:shortVersionString="0.5.7"
length="8871979"
type="application/octet-stream"