fix: let prerelease builds follow their own channel
Merged
TH
2mo ago+105+105+012345678901234567890123456789-9-9-0123456789
Summary
Prepares prerelease builds for the nightly channel in #3380:
- Update notice: a
-nightly.build checks and recommendsagent-device@nightly, not@latest. The update-check cache records which dist-tag it read from, so a version cached from the other channel is never shown. After a channel switch the next command runs a fresh check, and a failed check still records the new channel. - Android helper versionCode: a prerelease helper takes its base release's versionCode instead of
1, so a nightly or-devhelper replaces an older release. An equal code reinstalls when the checksums differ.
3 files.
Validation
At cdf4e654b7:
src/__tests__/update-check.test.ts: 8/8 pass, including the channel-switch and failed-check cases.- Live Android run on an API 37 emulator (evidence):
- The published 0.21.24 helper was
outdatedand got replaced; the device then reportedversionCode=21025. - The next run reported
currentand did not reinstall. - A nightly helper with the same code reinstalled once (
mismatched), then reportedcurrent.
- The published 0.21.24 helper was