fix(release): build the gem from inside ruby/ - #453
Merged
Conversation
The RubyGems lane could never have worked. gem build resolves spec.files
against the CURRENT directory, but the gemspec computes them with
Dir.chdir(root) so they are relative to ruby/. Running it from the repository
root made RubyGems look for ./lib/gmeow/gts.rb and fail validation:
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
["lib/gmeow/gts.rb"] are not files
This is the first gem this repository has ever published -- there are no ruby-v
tags before this release -- so nothing had exercised the path. The wrapper
package dry run does 'cd ${GTS_WORKSPACE}/ruby' before building, which is
exactly why it passed while the release lane could not build at all: the two
disagreed about the working directory, and only the dry run was ever run.
Surfaced while pushing ruby-v1.0.0.rc.1. The build failed before any registry
upload, so nothing reached RubyGems and the tag can be re-cut.
|
Warning Review limit reachedNext included review available in 26 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 97 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Comment |
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 RubyGems lane could never have worked.
gem buildresolvesspec.filesagainst the current directory, but the gemspec computes them withDir.chdir(root)so they are relative toruby/. Running it from the repository root made RubyGems look for./lib/gmeow/gts.rb:This is the first gem this repository has ever published — there are no
ruby-vtags before this release — so nothing had exercised the path.The telling part:
scripts/package_dry_run_wrappers.sh:530doescd "${GTS_WORKSPACE}/ruby"before building. The dry run and the release lane disagreed about the working directory, and only the dry run was ever run — so the dry run passed continuously while the thing it was supposed to be rehearsing was broken.Surfaced while pushing
ruby-v1.0.0.rc.1. The build failed before any registry upload, so nothing reached RubyGems and the tag can be re-cut.