Repository navigation
Staging version code from the build time (staging rollback on the phone) - #261
Merged
Merged
Conversation
…ck on the phone The commit count tied the code to history: a build of an older tag got a lower code, and Android never installs a lower one over a higher one. Minutes since 2020-01-01 UTC rise with every build whatever ref it comes from, so an older tag installs as an ordinary update and the phone keeps its data. Release codes stay as they are. releasing.md also describes testing a release tag on staging before production. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The staging app's version code is now minutes since 2020-01-01 UTC, set by Build phone app. It was the commit count before.
Why: the commit count tied the code to history, so a build of an older tag got a lower code. Android never installs a lower code over a higher one, so staging could be rolled back on the server but not on the phone. A build-time code rises with every build, whatever ref it comes from. An older tag therefore arrives as an ordinary update and the phone keeps its data. This is the usual practice for test tracks. Release codes are unchanged.
build-phone-app.ymlcomputesSTAGING_VERSION_CODEand no longer needs the full history for it.app.config.tsreads it. Without it, a local config run falls back to the release scheme.releasing.mdandself-hosting.mddescribe the new codes.releasing.mdalso adds how to test a release tag on staging before production.Two builds in the same minute share a code. Play keeps the first, and the upload script reports the second as a notice.
Checked:
make check;expo configwithAPP_VARIANT=staginggives3582082with the variable set and11001without. Not run yet: the next staging build. The jump from 410 to about 3.58 million is a normal update for the installed app.🤖 Generated with Claude Code