Skip to content

Simpler execution of committers script#2257

Open
ogajduse wants to merge 3 commits intotheforeman:gh-pagesfrom
ogajduse:fix-committers-script
Open

Simpler execution of committers script#2257
ogajduse wants to merge 3 commits intotheforeman:gh-pagesfrom
ogajduse:fix-committers-script

Conversation

@ogajduse
Copy link
Copy Markdown
Member

@ogajduse ogajduse commented Nov 13, 2025

The script was failing when run directly due to the wrong Ruby interpreter in the shebang.

Changes:

  • Change shebang to use Ruby from PATH - Changed from #!/usr/bin/ruby to #!/usr/bin/env ruby to respect the user's Ruby installation (rbenv, rvm, etc.)
  • Add usage instructions - Added comments explaining how to run the script using the existing scripts/Gemfile

Usage:

bundle exec --gemfile=scripts/Gemfile ruby scripts/committers.rb TAG_FROM TAG_TO

The git gem dependency is managed in scripts/Gemfile (not the main Gemfile) to keep script dependencies separate from website building dependencies.

Copy link
Copy Markdown
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I ever ran the committers script via bundle exec and treated the Gemfile as only what's needed to build the website. It adds a fair number of dependencies so I'm not sure I entirely agree with adding it, but I see your point. I don't have a good answer on how to proceed now.

The git gem dependency is only needed for the committers script,
not for building the website. The scripts/Gemfile already exists
for managing script-specific dependencies.

Usage: bundle exec --gemfile=scripts/Gemfile ruby scripts/committers.rb TAG_FROM TAG_TO

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ogajduse
Copy link
Copy Markdown
Member Author

Good point! I've updated the PR to remove the git gem from the main Gemfile.

Instead, the script should be run using the existing scripts/Gemfile which already has the git gem dependency:

bundle exec --gemfile=scripts/Gemfile ruby scripts/committers.rb TAG_FROM TAG_TO

This way we keep script dependencies separate from website building dependencies. I've also added usage instructions as comments at the top of the script.

@ogajduse ogajduse requested a review from ekohl March 17, 2026 16:24
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.

2 participants