-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve updater for tauri v2 & handle pre-release (#1204)
Description --- This pull request introduces support pre-release versions, placed in settings. It also contains creating `UpdatesManager` on the backend side, which is kinda refactor of the previous updater implementation for Tauri V1. * Added `pre_release` field to `AppConfig`, placed in "General Settings" * Moved updater logic to the backend, created `UpdatesManager` to handle all related logic and provide straightforward commands. It gives us more control over the updates flow and far more space for debugging. * Updater Dialog UI is not changed, it's just "dumb" and react to the events from rust. User shouldn't see any significant change How it works --- * When the pre-release version is enabled, the application retrieves the latest versions from `alpha-latest.json`. Disabling this flag immediately updates the application to the non-pre-release version. * When the pre-release version is disabled, the application fetches the latest versions from `latest.json`. From the user's perspective, there should be no significant changes. Enabling this flag instantly updates the application to the pre-release version. Motivation and Context --- #518 - Since we upgraded Tauri to v2, we can now handle pre-release versions. We use [Tauri Dynamic Update Server](https://v2.tauri.app/plugin/updater/#dynamic-update-server) to achieve this. This required us to move updater logic to the backend. What process can a PR reviewer use to test or verify this change? --- Testable on development environment. Play with this by changing * `tauri-conf.json` version to set the "current" app version * `latest.json` version to set the latest non-pre-release version * `alpha.json` version to set the latest pre-release version Toggle "pre_release" flag in the settings to switch between these app versions, turn on/off the `auto_update flag` and see how it affects the app. You can also update the app via "Release Notes" section --------- Co-authored-by: brianp <[email protected]>
- Loading branch information
Showing
29 changed files
with
658 additions
and
150 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.