chore(mobile): read the app version from the tag instead of committing it - #89
Merged
Conversation
…g it The release version lived in two places: mobile/app.json, bumped by hand before each tag, and the tag itself. CI papered over the gap by rewriting app.json during the build — so the committed value was simultaneously required by process and ignored in practice. That's a bump ritual whose only failure mode is silent. mobile/app.config.js now reads the version from LYFTR_VERSION, which the release job sets from the tag being built. The tag becomes the only place a release version exists: nothing to bump, nothing to drift, and the stamp step is gone rather than made more careful. expo.version in app.json becomes an explicit dev placeholder (0.0.0-dev) for when LYFTR_VERSION is unset — local expo start, dev builds, dry runs. It is never what ships, and RELEASING.md says so. android.versionCode is dropped entirely. It was kept as a seed to initialize the remote counter on the first appVersionSource: remote build; that has happened (the counter stands at 5 on EAS), so the field was inert and the CLI recommended removing it on every build. Verified `expo config --json` resolves 0.0.0-dev with no env var, and the exact value of LYFTR_VERSION when set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JxKyZy6vR6xKu7Sp2MrEwn
The dry run left LYFTR_VERSION unset and fell back to app.json's 0.0.0-dev — which is also app.config.js's fallback. So the versionName gate compared the fallback against itself and passed whether or not the variable ever reached the build. A check that cannot fail. EAS evaluates the app config both locally and on the builder, so that plumbing is precisely what needs proving before a tagged release depends on it. A dry run now builds as 0.0.0-dryrun.<run number>, a value that can only appear in the APK if LYFTR_VERSION actually flowed through — and the existing verify step then proves it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JxKyZy6vR6xKu7Sp2MrEwn
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 release version lived in two places —
mobile/app.json, bumped by hand before each tag, and the tag itself. CI papered over the gap by rewritingapp.jsonduring the build, so the committed value was simultaneously required by process and ignored in practice. A ritual whose only failure mode is silent.mobile/app.config.jsnow reads the version fromLYFTR_VERSION, which the release job sets from the tag. The tag becomes the only place a release version exists: nothing to bump, nothing to drift, and the stamp step is deleted rather than made more careful.Changes
mobile/app.config.js— new; the only thing it overrides isversion. Everything static stays inapp.json.expo.versionbecomes an explicit dev placeholder,0.0.0-dev, used whenLYFTR_VERSIONis unset: localexpo start, dev builds, dry runs. Never what ships.android.versionCodedropped. It was kept as a seed to initialize the remote counter on the firstappVersionSource: remotebuild. That has happened — the counter stands at 5 on EAS — so the field was inert, and the CLI recommended removing it on every build.LYFTR_VERSIONinstead.expo.versionbefore tagging" instruction is replaced with "there is nothing to bump."Verification
expo config --jsonresolves correctly both ways:version0.0.0-devLYFTR_VERSION=0.1.0-beta.50.1.0-beta.5LYFTR_VERSION=9.9.99.9.9android.versionCoderesolves toundefined, i.e. left to EAS.npm run type-checkpasses.What this can't prove before merge: a dry run leaves
LYFTR_VERSIONunset by design, so CI can only exercise the fallback. The tag path is verified locally viaexpo configabove, but its first real proof is the next tagged release — where the existing gate already fails the build if the APK'sversionNamedoesn't match the tag. So a regression here surfaces as a failed release, not a bad one.🤖 Generated with Claude Code
https://claude.ai/code/session_01JxKyZy6vR6xKu7Sp2MrEwn