release: stop committing Gemfile.lock - #9
Merged
Conversation
The metanorma/ci rubygems-release reusable workflow deletes Gemfile.lock, runs a fresh bundle install, then calls gem bump -- which aborts with "Uncommitted changes found" because the regenerated single-platform lockfile differs from the committed multi-platform one. This blocked the 0.1.2 release (run 31940603501). Published gems don't commit lockfiles (none of the sibling lutaml/ metanorma gems do). Removing it also eliminates the self-referencing lockfile problem where deployment-mode Bundler refuses to install after a version bump because the lockfile still pins the old gem version.
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.
Summary
git rm --cached Gemfile.lock+ gitignore itWhy
The metanorma/ci rubygems-release workflow does
rm -f Gemfile.lock→bundle install→gem bump. Our committed multi-platform lockfile gets regenerated as single-platform, sogem bumpaborts with "Uncommitted changes found. Please commit or stash. Aborting." — this blocked the 0.1.2 release (run 31940603501, release job failed at the bump step).None of the sibling gems (lutaml, chemicalml, niso-jats, rfcxml, sts-ruby) commit a lockfile — it's the published-gem convention. It also removes the self-referencing lockfile issue (Bundler deployment mode refusing installs after version bumps).
Impact on CI
bundler-cache: truein build.yml resolves fresh from the Gemfile each run (no lockfile) — supported by ruby/setup-ruby, just a slightly less stable cache key. Local suite verified: 176/176 passing without the lockfile.Test plan