Skip to content

Name the gitignore lines for Ruby setup output - #97

Merged
dblock merged 1 commit into
masterfrom
dblock/ignore-bundler-output
Nov 22, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/ignore-bundler-output

Conversation

@dblock

@dblock dblock commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

ruby/setup-ruby with bundler-cache: true runs bundle config --local path $PWD/vendor/bundle, so it installs gems into vendor/bundle and writes .bundle/config inside the checkout. When no lockfile is committed, it also creates one. Unless .gitignore covers these, the clean-checkout check at capture fails in every release and dry run, and the error listed 20 arbitrary gem paths with a generic hint. Found while adding the workflow to codegram/hyperclient#341.

  • Document the ignore lines in README step 1 (/vendor/bundle/, /.bundle/, and the lockfile unless it's committed, or the release Gemfile's lockfile), and in the workflow reference's capture step and dry run.
  • Say what to add when it fails. The clean-checkout error now folds untracked files under vendor/bundle/ and .bundle/ into one line per directory, and ends with the exact lines to add to .gitignore (mentioning committing the lockfile only when a lockfile is listed). A dry run's preflight job runs capture, so it reports these before any real release.
  • Other untracked or changed files, including a changed committed lockfile, are reported as before with no setup hint.

This replaces the earlier version of this PR, which added a workflow step that wrote the same paths to .git/info/exclude; that was more machinery than the problem needs.

Validation

  • PARALLEL_TEST_PROCESSORS=4 bundle exec rake (472 examples, 0 failures; RuboCop clean, including prose, Markdown, and spelling) and actionlint.
  • New specs in spec/ruby_gem_release/source_control/git_spec.rb use a real Git repository: setup output with 30 gem files, .bundle/config, Gemfile.lock, and gemfiles/release.gemfile.lock reports four folded paths and the four ignore lines; vendor/bundle alone omits the lockfile advice; an unrelated untracked file gets no setup hint.
  • Checked by hand that 500 files under vendor/bundle produce a three-line listing and the ignore lines.
  • The link check over all Markdown files finds no broken links or anchors.

Authored by an AI (Claude) acting on behalf of @dblock.

🤖 Generated with Claude Code

https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW

@dblock
dblock force-pushed the dblock/ignore-bundler-output branch from de045c4 to 04445a6 Compare November 22, 2026 15:11
@dblock dblock changed the title Document ignoring Bundler output Ignore Ruby setup output in the release checkout Nov 22, 2026
@dblock
dblock force-pushed the dblock/ignore-bundler-output branch from 04445a6 to ae31bf0 Compare November 22, 2026 15:14
ruby/setup-ruby with bundler-cache installs gems into vendor/bundle,
writes .bundle/config, and creates a lockfile when none is committed,
all inside the checkout. Unless .gitignore covers them, the clean
checkout check at capture fails in every release and dry run.

Document the lines to add in the README and workflow reference. When
the check fails on this output, fold each setup directory into one line
and end the error with the exact ignore lines, so a dry run says what
to add. Other untracked or changed files are reported as before.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
@dblock
dblock force-pushed the dblock/ignore-bundler-output branch from ae31bf0 to 471e8b3 Compare November 22, 2026 15:22
@dblock dblock changed the title Ignore Ruby setup output in the release checkout Name the gitignore lines for Ruby setup output Nov 22, 2026
@dblock
dblock merged commit cfe7964 into master Nov 22, 2026
12 checks passed
@dblock
dblock deleted the dblock/ignore-bundler-output branch November 22, 2026 15:27
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