Skip to content

Staging version code from the build time (staging rollback on the phone) - #261

Merged
bubulux merged 1 commit into
mainfrom
feat/staging-build-time-code
Oct 23, 2026
Merged

bubulux merged 1 commit into
mainfrom
feat/staging-build-time-code

Conversation

@bubulux

@bubulux bubulux commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

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.yml computes STAGING_VERSION_CODE and no longer needs the full history for it.
  • app.config.ts reads it. Without it, a local config run falls back to the release scheme.
  • releasing.md and self-hosting.md describe the new codes. releasing.md also 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 config with APP_VARIANT=staging gives 3582082 with the variable set and 11001 without. 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

…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>
@bubulux
bubulux merged commit 8bae61f into main Oct 23, 2026
5 checks passed
@bubulux
bubulux deleted the feat/staging-build-time-code branch October 23, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant