Skip to content

fix(release): plumb RELEASE_TAG_PREFIX from .bootstrap.env into fastlane - #287

Merged
prakashrj merged 1 commit into
mainfrom
upstream-fix/tag-prefix-plumbing
Sep 3, 2026
Merged

fix(release): plumb RELEASE_TAG_PREFIX from .bootstrap.env into fastlane#287
prakashrj merged 1 commit into
mainfrom
upstream-fix/tag-prefix-plumbing

Conversation

@prakashrj

Copy link
Copy Markdown
Contributor

Follow-up to #286, which shipped the knob incomplete. Found while adopting it downstream, not by re-reading the diff.

Two gaps

1. The setting was unreachable from .bootstrap.env. Bootstrap::Config is parsed from the file with no ENV merge, while Bootstrap::Version.tag_prefix reads ENV. So the field documented in .bootstrap.env.example did nothing — the one place a user would naturally set it.

2. asc_env did not propagate it. This is the worse one. Even with the env var set correctly, bin/ship.rb computes the tag in its own process and then launches fastlane with Bootstrap.asc_env(config) — which did not carry RELEASE_TAG_PREFIX. So:

ship.rb   → computes  app/v0.1.2+10
fastlane  → prefix is "v", tag does not start with it, `sub(/^v/,"")` no-ops
          → version = "app/v0.1.2+10"
          → every artifact name downstream built from that

A silent, wrong-output failure of exactly the kind this repo keeps running into: both processes succeed, and only the artifacts are wrong.

The fix

  • Config#release_tag_prefix — process env → .bootstrap.env"v". An explicitly empty value is honoured at both layers rather than falling through to "v", since empty is a legitimate choice (bare 1.0.0+5 tags).
  • RELEASE_TAG_PREFIX added to Config::OPTIONAL.
  • asc_env propagates it to the fastlane subprocess.
  • bin/ship.rb and bin/compute-release-tag.rb publish the resolved value into ENV before computing, so the resolver and fastlane cannot disagree.

Verification

test/tag_prefix_test.rb grows 16 → 23, the new ones covering precisely this plumbing.

Mutation-verified:

mutation assertions killed
drop the asc_env propagation (gap 2, as shipped) 1
make the accessor ignore .bootstrap.env (gap 1) 2

ci/check-shell.sh clean.

The feature shipped incomplete. Bootstrap::Config is parsed from the
file with no ENV merge, and Bootstrap::Version.tag_prefix reads ENV — so
setting the prefix in .bootstrap.env did nothing at all.

Worse, Bootstrap.asc_env did not propagate it. Even with the env set,
bin/ship.rb computed `app/v0.1.2+10` and handed it to a fastlane
subprocess that still believed the prefix was "v", so
strip_release_tag_prefix left the tag intact and every artifact name
downstream was built from `app/v0.1.2+10`.

Adds Config#release_tag_prefix (process env -> .bootstrap.env -> "v",
with an explicitly empty value honoured at both layers rather than
falling through to "v"), lists the key in Config::OPTIONAL, propagates
it through asc_env, and has bin/ship.rb and bin/compute-release-tag.rb
publish the resolved value into ENV before computing — so the resolver
and fastlane cannot disagree about the prefix.

test/tag_prefix_test.rb grows to 23 assertions. Mutation-verified:
dropping the asc_env propagation fails 1, and making the accessor ignore
the file fails 2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@prakashrj
prakashrj merged commit 658bd32 into main Sep 3, 2026
22 checks passed
@prakashrj
prakashrj deleted the upstream-fix/tag-prefix-plumbing branch September 3, 2026 08:10
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