fix(release): plumb RELEASE_TAG_PREFIX from .bootstrap.env into fastlane - #287
Merged
Conversation
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>
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.
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::Configis parsed from the file with noENVmerge, whileBootstrap::Version.tag_prefixreadsENV. So the field documented in.bootstrap.env.exampledid nothing — the one place a user would naturally set it.2.
asc_envdid not propagate it. This is the worse one. Even with the env var set correctly,bin/ship.rbcomputes the tag in its own process and then launches fastlane withBootstrap.asc_env(config)— which did not carryRELEASE_TAG_PREFIX. So: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 (bare1.0.0+5tags).RELEASE_TAG_PREFIXadded toConfig::OPTIONAL.asc_envpropagates it to the fastlane subprocess.bin/ship.rbandbin/compute-release-tag.rbpublish the resolved value intoENVbefore computing, so the resolver and fastlane cannot disagree.Verification
test/tag_prefix_test.rbgrows 16 → 23, the new ones covering precisely this plumbing.Mutation-verified:
asc_envpropagation (gap 2, as shipped).bootstrap.env(gap 1)ci/check-shell.shclean.