fix: Allow OTA update from RC build to full release (#778)

## Summary

* Allow OTA update from RC build to full release
* If all the segments match, then also check if the current version
contains "-rc"

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No
This commit is contained in:
Dave Allie
2026-02-09 08:08:19 +11:00
committed by GitHub
parent f34d7d2aac
commit b4b028be3a

View File

@@ -185,7 +185,16 @@ bool OtaUpdater::isUpdateNewer() const {
/* /*
* Check patch versions. * Check patch versions.
*/ */
return latestPatch > currentPatch; if (latestPatch != currentPatch) return latestPatch > currentPatch;
// If we reach here, it means all segments are equal.
// One final check, if we're on an RC build (contains "-rc"), we should consider the latest version as newer even if
// the segments are equal, since RC builds are pre-release versions.
if (strstr(currentVersion, "-rc") != nullptr) {
return true;
}
return false;
} }
const std::string& OtaUpdater::getLatestVersion() const { return latestVersion; } const std::string& OtaUpdater::getLatestVersion() const { return latestVersion; }