[fix] use numeric versions for desktop branch builds

This commit is contained in:
dijunkun
2026-10-20 21:14:38 +08:00
parent a625890b28
commit cb2ae207c4
3 changed files with 57 additions and 0 deletions
@@ -54,6 +54,15 @@ bool UpdateChecker::Poll(TimePoint now) {
ScheduleRetry(now);
return true;
}
// Branch names followed by a date are not application versions. Comparing
// their first digit sequence would incorrectly treat the date as a major
// version and report "up to date" for every ordinary release.
if (!IsValidAppVersion(current_version_) || !IsValidAppVersion(result->version)) {
LOG_WARN("Cannot compare invalid application versions: current={}, latest={}",
current_version_, result->version);
ScheduleRetry(now);
return true;
}
latest_ = std::move(result);
update_available_ =
IsNewerVersionWithMetadata(current_version_, latest_->version,