mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-09 00:56:37 +08:00
fix: skip version check for preview channel and add upload progress bar
Co-authored-by: Rain-kl <63696351+Rain-kl@users.noreply.github.com>
This commit is contained in:
@@ -376,7 +376,15 @@ func buildLatestServerReleaseView(release *githubReleaseResponse, channel Releas
|
||||
isDevBuild := currentVersion == "" || strings.EqualFold(currentVersion, "dev")
|
||||
hasUpdate := false
|
||||
if release != nil && !isDevBuild {
|
||||
hasUpdate = isVersionNewer(currentVersion, release.TagName)
|
||||
if channel == ReleaseChannelPreview {
|
||||
// Preview releases use a "major.minor.patch-git-<commit>" scheme that cannot
|
||||
// be meaningfully compared against the running stable version, so we skip the
|
||||
// version check and always allow upgrading when the user explicitly selects
|
||||
// the preview channel.
|
||||
hasUpdate = true
|
||||
} else {
|
||||
hasUpdate = isVersionNewer(currentVersion, release.TagName)
|
||||
}
|
||||
}
|
||||
|
||||
serverUpgradeState.Lock()
|
||||
|
||||
Reference in New Issue
Block a user