A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Dave Allie and committed by
GitHub
b4b028be f34d7d2a

+10 -1
+10 -1
src/network/OtaUpdater.cpp
··· 185 185 /* 186 186 * Check patch versions. 187 187 */ 188 - return latestPatch > currentPatch; 188 + if (latestPatch != currentPatch) return latestPatch > currentPatch; 189 + 190 + // If we reach here, it means all segments are equal. 191 + // One final check, if we're on an RC build (contains "-rc"), we should consider the latest version as newer even if 192 + // the segments are equal, since RC builds are pre-release versions. 193 + if (strstr(currentVersion, "-rc") != nullptr) { 194 + return true; 195 + } 196 + 197 + return false; 189 198 } 190 199 191 200 const std::string& OtaUpdater::getLatestVersion() const { return latestVersion; }