Implement auto-update functionality and settings integration - #23
Open
DinanathDash wants to merge 2 commits into
Open
Implement auto-update functionality and settings integration#23DinanathDash wants to merge 2 commits into
DinanathDash wants to merge 2 commits into
Conversation
Contributor
Author
|
@srimanachanta You need to edit out some logic according to your GitHub configurations. In the next PR, I'm adding the GitHub automation for both brew and .dmg app installation methods, to support this auto updater function. |
Owner
|
Given this cask isnt marked as auto-updating on homebrew, and likely will not be, you should be guarding on homebrew installs to disable this feature entirely. |
Per review feedback: since the Stasis cask is not marked as auto-updating on Homebrew and likely won't be, the built-in updater is now fully disabled when running from a Homebrew-managed install. - UpdaterService: add static isHomebrewInstall that detects Homebrew Cask by checking if the bundle path is under a known Caskroom prefix (/opt/homebrew/Caskroom on Apple Silicon, /usr/local/Caskroom on Intel) - UpdaterService: guard startIfAvailable() and checkForUpdates() to no-op silently on Homebrew installs - AboutSettingsView: replace update toggle/picker/button with an informational note (brew upgrade --cask stasis) when running from Homebrew, so users know how to update through the correct channel
Contributor
Author
|
Hey @srimanachanta! Addressed your review — here's what was updated:
Let me know if anything needs tweaking! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive update system for Stasis, allowing the app to check for, notify about, and automatically download updates from GitHub. It adds a new
UpdaterService, integrates update preferences into the settings UI, and expands localization strings to support these features. Additionally, it improves the menu rebuilding logic for better user experience.Update System Integration:
UpdaterServicesingleton, which checks for updates from GitHub, notifies the user, and can auto-download updates to the Downloads folder based on user preferences. It supports both manual and automatic update checks and handles user interaction for update installation. (Stasis/Services/UpdaterService.swift)Stasis/DefaultsKeys.swift)AboutSettingsViewto the settings UI, providing controls for update preferences, manual update checks, and displaying version information. (Stasis/Views/Settings/AboutSettingsView.swift)SettingsWindowControllerandSettingsViewto include and pass theUpdaterServiceand new About tab. (Stasis/Controllers/SettingsWindowController.swift,Stasis/Views/Settings/SettingsView.swift) [1] [2] [3]Localization and UI:
Stasis/L10n/Localizable.xcstrings) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Menu Handling Improvements:
Stasis/AppDelegate.swift) [1] [2] [3] [4] [5] [6]These changes collectively provide a robust, user-friendly update experience and enhance the overall settings and UI responsiveness.