Rename create_release to release and fix version.rb staging path#986
Rename create_release to release and fix version.rb staging path#986
Conversation
Bundler's built-in `release` task reads version.rb directly, bypassing the custom `create_release` task's CHANGELOG version detection, npm publish, GitHub release sync, and version policy checks. This caused releases to use the wrong version when CHANGELOG had been updated. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis pull request renames the rake task from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR overrides Bundler's built-in
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer runs rake release] --> B{Which task?}
B -->|Old Bundler default| C[Reads version.rb directly]
B -->|New override in this PR| D[abort with helpful message]
C --> E[Skips CHANGELOG detection]
C --> F[Skips npm publish check]
C --> G[Skips version policy check]
C --> H[Potential wrong-version release]
D --> I[Prints: use rake create_release instead]
I --> J[Exit 1]
K[Developer runs rake create_release] --> L[extract_latest_changelog_version]
L --> M[validate_release_version_policy!]
M --> N[verify_npm_auth + verify_gh_auth]
N --> O[gem bump + bundle install]
O --> P[release-it npm publish]
P --> Q[gem release RubyGems]
Q --> R[sync_github_release_after_publish]
Last reviewed commit: 20a36d0 |
ReviewClean, well-motivated change. The approach is correct — One minor robustness note: Rake::Task[:release].clear if Rake::Task.task_defined?(:release)This is a low-probability scenario, but given that this is in an open-source project that needs to work across a range of Bundler versions, it's worth the one-line defensive check. Everything else looks good:
|
- Rename `create_release` task to `release`, replacing Bundler's default task. Matches react_on_rails naming convention. - Fix `git add version.rb` → `git add lib/shakapacker/version.rb` to use the correct path from the repo root. - Update all references in docs/releasing.md and update-changelog command. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Review: Rename
|
## Summary - Renames `create_release` task to `release`, replacing Bundler's default `release` task. This matches the react_on_rails naming convention — users just run `rake release`. - Fixes `git add version.rb` → `git add lib/shakapacker/version.rb` — the path was wrong since the command runs from the repo root, causing `fatal: pathspec 'version.rb' did not match any files`. - Updates all references in docs/releasing.md and the update-changelog command. Closes #985 context — the release crashed because `git add version.rb` couldn't find the file at the repo root level. ## Test plan - [x] `rake release` shows the custom release task (not Bundler's) - [x] `rake build` and `rake install` still work from bundler/gem_tasks - [x] `rake -T release` shows correct task name and description - [x] No remaining `create_release` references in codebase - [x] RuboCop passes - [x] All 14 rake_tasks specs pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated release guide to reflect new task naming conventions and enhanced workflow * **Chores** * Renamed release task from `create_release` to `release` throughout the system * Enhanced release workflow to automatically detect gem version from CHANGELOG.md when not explicitly provided <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
Summary
create_releasetask torelease, replacing Bundler's defaultreleasetask. This matches the react_on_rails naming convention — users just runrake release.git add version.rb→git add lib/shakapacker/version.rb— the path was wrong since the command runs from the repo root, causingfatal: pathspec 'version.rb' did not match any files.Closes #985 context — the release crashed because
git add version.rbcouldn't find the file at the repo root level.Test plan
rake releaseshows the custom release task (not Bundler's)rake buildandrake installstill work from bundler/gem_tasksrake -T releaseshows correct task name and descriptioncreate_releasereferences in codebase🤖 Generated with Claude Code
Summary by CodeRabbit
create_releasetoreleasethroughout the system