From b2b8dc148e905f86d056b731413233359b85f4fe Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Tue, 30 Sep 2025 22:14:19 -1000 Subject: [PATCH 1/2] Add check for gem-release installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release task requires the gem-release gem to be installed globally. Added a check at the beginning of the task to verify it's installed and provide clear installation instructions if it's missing. Also clarified in the task description that gem-release should be installed globally with `gem install gem-release`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/tasks/release.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake index a9e3b09..46c4a0e 100644 --- a/lib/tasks/release.rake +++ b/lib/tasks/release.rake @@ -4,7 +4,8 @@ desc("Releases the gem using the given version. IMPORTANT: the gem version must be in valid rubygem format (no dashes). -This task depends on the gem-release ruby gem which is installed via `bundle install` +This task depends on the gem-release ruby gem. Install it globally with: + gem install gem-release 1st argument: The new version in rubygem format (no dashes). Pass no argument to automatically perform a patch version bump. @@ -21,6 +22,11 @@ task :release, %i[gem_version dry_run] do |_t, args| File.expand_path('..', __dir__) end + # Check if gem-release is installed + unless system("gem list -i gem-release > /dev/null 2>&1") + raise "gem-release is not installed. Please run: gem install gem-release" + end + # Check if there are uncommitted changes unless `git status --porcelain`.strip.empty? raise "You have uncommitted changes. Please commit or stash them before releasing." From 4c6f891e9aad05eb1d92088f6094efb30a467116 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 1 Oct 2025 13:44:25 -1000 Subject: [PATCH 2/2] Remove redundant gem-release check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gem-release gem is already listed as a development dependency in the gemspec (line 24), so the explicit check is redundant. Updated the task description to: - Note that gem-release is a dev dependency - Provide troubleshooting hint if 'Unknown command bump' error occurs - Remove the runtime check that was failing before bundle install The gem bump and gem release commands need to be available in the Ruby installation's gem path, which happens automatically after bundle install. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/tasks/release.rake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake index 46c4a0e..e17bc09 100644 --- a/lib/tasks/release.rake +++ b/lib/tasks/release.rake @@ -4,7 +4,8 @@ desc("Releases the gem using the given version. IMPORTANT: the gem version must be in valid rubygem format (no dashes). -This task depends on the gem-release ruby gem. Install it globally with: +This task depends on the gem-release ruby gem (listed as a dev dependency). +If you get 'Unknown command bump' errors, install gem-release: gem install gem-release 1st argument: The new version in rubygem format (no dashes). Pass no argument to @@ -22,11 +23,6 @@ task :release, %i[gem_version dry_run] do |_t, args| File.expand_path('..', __dir__) end - # Check if gem-release is installed - unless system("gem list -i gem-release > /dev/null 2>&1") - raise "gem-release is not installed. Please run: gem install gem-release" - end - # Check if there are uncommitted changes unless `git status --porcelain`.strip.empty? raise "You have uncommitted changes. Please commit or stash them before releasing."