Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ 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 (listed as a dev dependency).
If you get 'Unknown command bump' errors, install gem-release:
gem install gem-release
Comment on lines +7 to +9
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: PR objectives not implemented—missing gem-release installation check.

The PR description states this change "adds a check to verify that the gem-release gem is installed before running the release rake task" using gem list -i gem-release, but the actual implementation only updates documentation text. No programmatic check exists in the task body (lines 16-61), so users will still encounter "Unknown command bump" runtime errors at line 39-42 when gem-release is missing.

To implement the stated objectives, add this check after line 29 (after the git status check):

   unless `git status --porcelain`.strip.empty?
     raise "You have uncommitted changes. Please commit or stash them before releasing."
   end
+
+  # Check if gem-release is installed
+  unless system("gem list -i gem-release > /dev/null 2>&1")
+    raise <<~ERROR
+      The gem-release gem is required but not installed.
+      Please install it with:
+        gem install gem-release
+    ERROR
+  end

   args_hash = args.to_hash

⚠️ Potential issue | 🟡 Minor

Clarify dependency installation method—wording is inconsistent.

Line 7 states gem-release is "listed as a dev dependency" (implying Gemfile + bundle install), but lines 8-9 instruct gem install gem-release (global installation). These are different installation methods and the mixed messaging is confusing.

Choose one approach and update accordingly:

Option 1: If gem-release should be in Gemfile (recommended for reproducibility):

-This task depends on the gem-release ruby gem (listed as a dev dependency).
-If you get 'Unknown command bump' errors, install gem-release:
+This task depends on the gem-release ruby gem (listed as a dev dependency in the Gemfile).
+Ensure dependencies are installed with:
+  bundle install
+
+If you still get 'Unknown command bump' errors, you may need to run:
   gem install gem-release

Option 2: If gem-release should be installed globally:

-This task depends on the gem-release ruby gem (listed as a dev dependency).
+This task depends on the gem-release ruby gem being installed globally.
 If you get 'Unknown command bump' errors, install gem-release:
   gem install gem-release
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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
This task depends on the gem-release ruby gem (listed as a dev dependency in the Gemfile).
Ensure dependencies are installed with:
bundle install
If you still get 'Unknown command bump' errors, you may need to run:
gem install gem-release
🤖 Prompt for AI Agents
In lib/tasks/release.rake around lines 7 to 9, the note mixes two installation
approaches for the gem-release tool (saying it's a dev dependency while
instructing gem install), which is confusing; pick one approach and update the
wording accordingly — recommended: add gem-release to the Gemfile under
development/test and change the message to instruct developers to run bundle
install and use bundle exec gem-release (or run the rake task under Bundler), or
if you prefer a global install, explicitly state that gem-release must be
installed globally and keep the gem install gem-release instruction while
removing the "dev dependency" reference; ensure the final comment clearly
specifies the chosen installation method and the exact command to run.

1st argument: The new version in rubygem format (no dashes). Pass no argument to
automatically perform a patch version bump.
Expand Down