ruby: Fix pure build #15
Merged
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.
Verified with #16 and:
ruby: Fix pure build
By splitting the dependency fetching into an impure build and
referencing the cache directory from the pure build.
This avoids using or modifying unversioned config and cache from the
current working directory so that the build is as reproducible as
possible.
It took a while to find the right Bundler options to achieve this from
these docs:
Even so, the
bundle cache --no-installcommand appears to always copythe gems twice, so I'm manually deleting the non-cache version.
I'm unsure how much of this was hard because the project structure
doesn't match what you'd get from
bundle gem <name>, which create itsown binstub and gemspec, but I don't want to make too many changes at
once.
ruby: More targeted copy in pure build
Only copy what we need rather than copying everything and then deleting
things that we don't expect. This prevents a
vendordirectory frombeing added to the package twice and any
result-symlinks.ruby: Make non-pure look more like deps+pure
Backport the config options, install commands, and targeted copy from
the deps and pure builds in the two preceding commits.