From 09cea67041e98948f6fbe30ff5018b7731bf3fe2 Mon Sep 17 00:00:00 2001 From: nimbold <11913706+nimbold@users.noreply.github.com> Date: Sat, 6 Jun 2026 15:54:44 +0330 Subject: [PATCH] fix(updates): harden Sparkle release metadata --- .gitignore | 16 ++++++++++++++++ Extensions/Firefox | 2 +- Sources/Firelink/FirelinkApp.swift | 14 +++++++++++++- appcast.xml | 3 ++- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 914384b..5e200d4 100644 --- a/.gitignore +++ b/.gitignore @@ -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* diff --git a/Extensions/Firefox b/Extensions/Firefox index de6bb27..0b56f13 160000 --- a/Extensions/Firefox +++ b/Extensions/Firefox @@ -1 +1 @@ -Subproject commit de6bb273a4ffa66675b619ceb21055abb941ab5f +Subproject commit 0b56f13cef8cc0c9e7a058b6f6bcaf1d1043bd30 diff --git a/Sources/Firelink/FirelinkApp.swift b/Sources/Firelink/FirelinkApp.swift index e35719b..b3d27f0 100644 --- a/Sources/Firelink/FirelinkApp.swift +++ b/Sources/Firelink/FirelinkApp.swift @@ -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 diff --git a/appcast.xml b/appcast.xml index fecd9c0..9cfbaf0 100644 --- a/appcast.xml +++ b/appcast.xml @@ -8,10 +8,11 @@ Version 0.5.7 14.0 + arm64 https://github.com/nimbold/Firelink/releases/tag/v0.5.7 Sat, 06 Jun 2026 11:36:06 +0000