Skip to content

Commit d2e2bc7

Browse files
ihabadhamclaude
andcommitted
fix: remove v prefix from git tags to restore historical convention
PR #1856 unintentionally introduced a `v` prefix to git tags when it replaced `release-it` with manual git commands. The `release-it` tool auto-detected the existing tag format (no `v` prefix), but the manual implementation explicitly added `v#{version}`. This broke 9+ years of consistent tagging convention (versions 2.0.0 through 16.1.2 all used no `v` prefix) and caused issues like broken CHANGELOG links (fixed in PR #2263). Changes: - Remove `v` prefix from tag creation in release.rake - Update releasing.md to document the correct convention - Update update-changelog.md to reflect no `v` prefix for future tags - Add notes about historical v16.2.0.beta.x tags that have `v` prefix Fixes #2267 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 3efa19d commit d2e2bc7

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.claude/commands/update-changelog.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ To determine the most recent version:
109109
git tag --sort=-v:refname | head -10
110110
```
111111

112-
This shows tags like `v16.2.0.beta.20`, `v16.2.0.beta.19`, etc.
112+
This shows tags like `16.2.1`, `16.2.0`, `16.1.1`, etc.
113+
Note: Some historical tags (v16.2.0.beta.0 through v16.2.0.rc.0) have a `v` prefix due to a
114+
temporary convention change, but the standard convention is no `v` prefix.
113115

114116
2. **Check the CHANGELOG.md** for version headers (note: changelog uses versions WITHOUT the `v` prefix):
115117
- `### [16.2.0.beta.19] - 2025-12-10` (beta version)
@@ -123,7 +125,7 @@ To determine the most recent version:
123125

124126
4. **The first match after `### [Unreleased]`** is the most recent version in the changelog.
125127

126-
**IMPORTANT**: Git tags use `v` prefix (e.g., `v16.2.0.beta.20`) but the changelog and compare links use versions WITHOUT the `v` prefix (e.g., `16.2.0.beta.20`). Strip the `v` when adding to the changelog.
128+
**IMPORTANT**: Git tags do NOT use a `v` prefix (e.g., `16.2.1`, `16.1.1`). The changelog and compare links also use versions without the `v` prefix. Note: Some historical tags from v16.2.0.beta.0 through v16.2.0.rc.0 have a `v` prefix - strip it when adding to the changelog.
127129

128130
### Version Links
129131

@@ -210,7 +212,10 @@ When a new version is released:
210212

211213
### For Beta to Non-Beta Version Release
212214

213-
When releasing from beta to a stable version (e.g., git tag `v16.1.0.beta.3``v16.1.0`):
215+
When releasing from beta to a stable version (e.g., git tag `16.3.0.beta.3``16.3.0`):
216+
217+
> **Note**: Historical tags v16.2.0.beta.0 through v16.2.0.rc.0 have a `v` prefix due to a temporary
218+
> convention change. Future releases use no `v` prefix.
214219
215220
1. **Remove all beta version labels** from the changelog:
216221
- Change `### [16.1.0.beta.1]`, `### [16.1.0.beta.2]`, etc. to a single `### [16.1.0]` section
@@ -233,7 +238,8 @@ When a new beta version is released (e.g., `16.2.0.beta.20`):
233238
git tag --sort=-v:refname | head -5
234239
```
235240

236-
This shows the latest tags (e.g., `v16.2.0.beta.20`). Strip the `v` prefix for changelog use.
241+
This shows the latest tags (e.g., `16.2.0.beta.21`, `16.2.0.beta.20`).
242+
Note: Historical tags v16.2.0.beta.0 through v16.2.0.rc.0 have a `v` prefix - strip it for changelog use.
237243

238244
2. **Find the most recent version** in the changelog by looking for the first `### [VERSION] - DATE` after `### [Unreleased]`
239245

docs/contributor-info/releasing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ When you run `rake release[X.Y.Z]`, the task will:
115115
7. Update the Pro package's dependency on react-on-rails
116116
8. Update the dummy app's Gemfile.lock
117117
9. Commit all version changes with message "Bump version to X.Y.Z"
118-
10. Create a git tag `vX.Y.Z`
118+
10. Create a git tag `X.Y.Z` (no `v` prefix, matching historical convention)
119119
11. Push commits and tags to the remote repository
120120
12. Publish `react-on-rails` to NPM (requires 2FA token)
121121
13. Publish `react-on-rails-pro` to NPM (requires 2FA token)
@@ -264,7 +264,7 @@ If the release fails partway through (e.g., during NPM publish):
264264
- RubyGems: `gem list react_on_rails -r -a`
265265

266266
2. If the git tag was created but packages weren't published:
267-
- Delete the tag: `git tag -d vX.Y.Z && git push origin :vX.Y.Z`
267+
- Delete the tag: `git tag -d X.Y.Z && git push origin :X.Y.Z`
268268
- Revert the version commit: `git reset --hard HEAD~1 && git push -f`
269269
- Start over with `rake release[X.Y.Z]`
270270

rakelib/release.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ task :release, %i[version dry_run] do |_t, args|
246246
end
247247

248248
# Create git tag (skip if it already exists)
249-
tag_name = "v#{actual_gem_version}"
249+
# Note: Tags use version without 'v' prefix (e.g., '16.2.0' not 'v16.2.0')
250+
# to match the historical convention used from version 2.0.0 through 16.1.2
251+
tag_name = actual_gem_version
250252
tag_exists = system("cd #{monorepo_root} && git rev-parse #{tag_name} >/dev/null 2>&1")
251253
if tag_exists
252254
puts "Git tag #{tag_name} already exists, skipping tag creation"

0 commit comments

Comments
 (0)