Skip to content

Commit b2b8dc1

Browse files
justin808claude
andcommitted
Add check for gem-release installation
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 <[email protected]>
1 parent af98130 commit b2b8dc1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/tasks/release.rake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ desc("Releases the gem using the given version.
44
55
IMPORTANT: the gem version must be in valid rubygem format (no dashes).
66
7-
This task depends on the gem-release ruby gem which is installed via `bundle install`
7+
This task depends on the gem-release ruby gem. Install it globally with:
8+
gem install gem-release
89
910
1st argument: The new version in rubygem format (no dashes). Pass no argument to
1011
automatically perform a patch version bump.
@@ -21,6 +22,11 @@ task :release, %i[gem_version dry_run] do |_t, args|
2122
File.expand_path('..', __dir__)
2223
end
2324

25+
# Check if gem-release is installed
26+
unless system("gem list -i gem-release > /dev/null 2>&1")
27+
raise "gem-release is not installed. Please run: gem install gem-release"
28+
end
29+
2430
# Check if there are uncommitted changes
2531
unless `git status --porcelain`.strip.empty?
2632
raise "You have uncommitted changes. Please commit or stash them before releasing."

0 commit comments

Comments
 (0)