-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve updater for tauri v2 & handle pre-release #1204
feat: improve updater for tauri v2 & handle pre-release #1204
Conversation
98595da
to
1eb41b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and seems to be working well enough in development.
Functionality change
Right now the current implementation permits downgrades if the latest.json, or alpha-latest.json has a lower version. We do not want downgrades to happen in this case. As we sometimes utilize the ability to bump a version up, have users download it, and then set the version lower. To rollout to only a small amount of people.
Ideally the only time we should allow downgrade is if the user is turning off pre-release versions.
When toggling the pre-release, We should also alert the user that we're going to restart with their upgraded or downgraded version.
UX Change
Put the pre-release setting directly after the auto-update setting.
To sum up: app will only allow to downgrade, when user manually switches off the |
75a7a02
to
4f5dff9
Compare
Sorry for lags, cancelled twice and then confirmed: Screencast.from.12-10-2024.05.09.45.PM.webm |
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.pre_release
field toAppConfig
, placed in "General Settings"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.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 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 versionlatest.json
version to set the latest non-pre-release versionalpha.json
version to set the latest pre-release versionToggle "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