shakapacker 9.6.0.rc.1 → 9.6.0.rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/commands/update-changelog.md +111 -26
- data/CHANGELOG.md +4 -4
- data/docs/releasing.md +67 -60
- data/lib/shakapacker/utils/version_syntax_converter.rb +1 -1
- data/lib/shakapacker/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8de376ed8bf26aa80f043c1b4f1edfe9fe14e76b8b5db9d4d4bdfc6fc1b0c62
|
|
4
|
+
data.tar.gz: 84db935f44746cc5ec67a1e71018bab24d1a17c2be17a27a4d6d894e35e4e106
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9b75f026df4c043286fe9d068651de5c67eecd2c34a6946a6d708498d6c9cd032db716805126eb280ef72ef828582391d0579f304d30ccf736fd6d0d3ea6456
|
|
7
|
+
data.tar.gz: 5574ca0d5f1992980e8f2cb615c76fb0934201493d0994fcef5a6824040ba3eb6a01d4aae087fc2941b3fa52529eb6f6ec71e1b4230f9c44c6379d4b0fdb141e
|
|
@@ -2,6 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
You are helping to add an entry to the CHANGELOG.md file for the Shakapacker project.
|
|
4
4
|
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
This command accepts an optional argument: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
- **No argument** (`/update-changelog`): Add entries to `[Unreleased]` without stamping a version header. Use this during development.
|
|
10
|
+
- **`release`** (`/update-changelog release`): Add entries and stamp a version header. Auto-compute the next version based on changes (breaking → major, added features → minor, fixes → patch). Then `rake create_release` (with no args) will pick up this version automatically.
|
|
11
|
+
- **`rc`** (`/update-changelog rc`): Same as `release`, but stamps an RC prerelease version (e.g., `v9.7.0-rc.0`). Auto-increments the RC index if prior RCs exist for the same base version.
|
|
12
|
+
- **`beta`** (`/update-changelog beta`): Same as `rc`, but stamps a beta prerelease version (e.g., `v9.7.0-beta.0`).
|
|
13
|
+
|
|
14
|
+
## When to Use This
|
|
15
|
+
|
|
16
|
+
This command serves three use cases at different points in the release lifecycle:
|
|
17
|
+
|
|
18
|
+
**During development** — Add entries to `[Unreleased]` as PRs merge:
|
|
19
|
+
|
|
20
|
+
- Run `/update-changelog` to find merged PRs missing from the changelog
|
|
21
|
+
- Entries accumulate under `## [Unreleased]`
|
|
22
|
+
|
|
23
|
+
**Before a release** — Stamp a version header and prepare for release:
|
|
24
|
+
|
|
25
|
+
- Run `/update-changelog release` (or `rc` or `beta`) to add entries AND stamp the version header
|
|
26
|
+
- The version is auto-computed from changelog content (see "Auto-Computing the Next Version" below)
|
|
27
|
+
- Commit and push CHANGELOG.md
|
|
28
|
+
- Then run `rake create_release` (no args needed — it reads the version from CHANGELOG.md)
|
|
29
|
+
- The release task automatically creates a GitHub release from the changelog section
|
|
30
|
+
|
|
31
|
+
**After a release you forgot to update the changelog for** — Catch-up mode:
|
|
32
|
+
|
|
33
|
+
- The command can retroactively find commits between tags and add missing entries
|
|
34
|
+
- Ask the user whether to stamp a version header or add to `[Unreleased]`
|
|
35
|
+
|
|
36
|
+
### Why changelog comes BEFORE the release
|
|
37
|
+
|
|
38
|
+
- `create_release` automatically creates a GitHub release if a changelog section exists — no separate `sync_github_release` step needed
|
|
39
|
+
- The release task warns if no changelog section is found for the target version
|
|
40
|
+
- A premature version header (if release fails) is harmless — you'll release eventually
|
|
41
|
+
- A missing changelog after release means GitHub release must be created manually
|
|
42
|
+
|
|
43
|
+
## Auto-Computing the Next Version
|
|
44
|
+
|
|
45
|
+
When stamping a version header (`release`, `rc`, or `beta`), compute the next version as follows:
|
|
46
|
+
|
|
47
|
+
1. **Find the latest stable version tag** using semver sort:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git tag -l 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. **Determine bump type from changelog content**:
|
|
54
|
+
- If changes include `### Breaking Changes` or `### ⚠️ Breaking Changes` → **major** bump
|
|
55
|
+
- If changes include `### Added` or `### New Features` → **minor** bump
|
|
56
|
+
- If changes only include `### Fixed`, `### Security`, `### Improved`, `### Changed`, `### Deprecated` → **patch** bump
|
|
57
|
+
|
|
58
|
+
3. **Compute the version**:
|
|
59
|
+
- For `release`: Apply the bump to the latest stable tag (e.g., `9.5.0` + minor → `9.6.0`)
|
|
60
|
+
- For `rc`: Apply the bump, then find the next RC index (e.g., if `v9.6.0-rc.0` tag exists → `v9.6.0-rc.1`)
|
|
61
|
+
- For `beta`: Same as RC but with beta suffix
|
|
62
|
+
|
|
63
|
+
4. **Verify**: Check that the computed version is newer than ALL existing tags (stable and prerelease). If not, ask the user what to do.
|
|
64
|
+
|
|
65
|
+
5. **Show the computed version to the user** and ask for confirmation before stamping the header.
|
|
66
|
+
|
|
5
67
|
## Critical Requirements
|
|
6
68
|
|
|
7
69
|
1. **User-visible changes only**: Only add changelog entries for user-visible changes:
|
|
@@ -74,6 +136,21 @@ Entries should be organized under these section headings. The project uses both
|
|
|
74
136
|
|
|
75
137
|
**Only include section headings that have entries.**
|
|
76
138
|
|
|
139
|
+
### Version Header Format
|
|
140
|
+
|
|
141
|
+
**Stable releases**: `## [v9.6.0] - March 7, 2026`
|
|
142
|
+
|
|
143
|
+
**Prerelease versions** (RC and beta): Use npm semver format with dashes, NOT RubyGems dot format:
|
|
144
|
+
|
|
145
|
+
- Correct: `## [v9.6.0-rc.1]` (npm semver — this is what `sync_github_release` expects)
|
|
146
|
+
- Wrong: `## [v9.6.0.rc.1]` (RubyGems format — do NOT use this in CHANGELOG.md headers)
|
|
147
|
+
|
|
148
|
+
This matters because the release rake tasks convert between formats:
|
|
149
|
+
|
|
150
|
+
- Git tags use npm format: `v9.6.0-rc.1`
|
|
151
|
+
- Gem versions use RubyGems format: `9.6.0.rc.1`
|
|
152
|
+
- CHANGELOG.md headers must match git tag format: `## [v9.6.0-rc.1]`
|
|
153
|
+
|
|
77
154
|
### Version Management
|
|
78
155
|
|
|
79
156
|
After adding entries, use the rake task to manage version headers:
|
|
@@ -110,16 +187,17 @@ When a new version is released:
|
|
|
110
187
|
### For Regular Changelog Updates
|
|
111
188
|
|
|
112
189
|
1. **ALWAYS fetch latest changes first**:
|
|
113
|
-
- **CRITICAL**: Run `git fetch origin main` to ensure you have the latest commits
|
|
190
|
+
- **CRITICAL**: Run `git fetch origin main --tags` to ensure you have the latest commits AND tags
|
|
114
191
|
- The workspace may be behind origin/main, causing you to miss recently merged PRs
|
|
115
192
|
- After fetching, use `origin/main` for all comparisons, NOT local `main` branch
|
|
116
193
|
|
|
117
194
|
2. **Determine the correct version tag to compare against**:
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
195
|
+
- List all version tags sorted by semver: `git tag -l 'v*' --sort=-v:refname | head -10`
|
|
196
|
+
- This correctly sorts RC/beta tags (e.g., `v9.6.0-rc.1` sorts after `v9.6.0-rc.0` and before `v9.6.0`)
|
|
197
|
+
- The latest tag may be a stable release, RC, or beta — handle all cases
|
|
198
|
+
- Compare origin/main branch date to the tag date using: `git log -1 --format="%ai" origin/main` and `git log -1 --format="%ai" <tag>`
|
|
199
|
+
- If the tag is NEWER than origin/main, the branch needs updating to include the tag's commits
|
|
200
|
+
- **CRITICAL**: Always use `git log TAG..BRANCH` to find commits in the branch but not the tag, AND `git log BRANCH..TAG` to check if the tag is ahead
|
|
123
201
|
|
|
124
202
|
3. **Check commits and version boundaries**:
|
|
125
203
|
- **IMPORTANT**: Use `origin/main` in all commands below, not local `main`
|
|
@@ -162,37 +240,44 @@ When a new version is released:
|
|
|
162
240
|
|
|
163
241
|
10. **Show the user** the added or moved entries and explain what was done.
|
|
164
242
|
|
|
165
|
-
### For
|
|
243
|
+
### For Prerelease Versions (RC and Beta)
|
|
166
244
|
|
|
167
|
-
When
|
|
245
|
+
When the user passes `rc` or `beta` as an argument (or when creating a prerelease section manually):
|
|
168
246
|
|
|
169
|
-
1. **
|
|
170
|
-
- Change `## [v9.1.0-beta.1]`, `## [v9.1.0-beta.2]`, etc. to a single `## [v9.1.0]` section
|
|
171
|
-
- Combine all beta entries into the stable release section
|
|
247
|
+
1. **Find the latest tag** (stable or prerelease) using semver sort:
|
|
172
248
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
- Keep the most recent/accurate description of each change
|
|
249
|
+
```bash
|
|
250
|
+
git tag -l 'v*' --sort=-v:refname | head -10
|
|
251
|
+
```
|
|
177
252
|
|
|
178
|
-
|
|
253
|
+
2. **Auto-compute the next prerelease version** using the process in "Auto-Computing the Next Version" above.
|
|
179
254
|
|
|
180
|
-
|
|
255
|
+
3. **Use npm semver format** for the version header:
|
|
256
|
+
- RC: `## [v9.6.0-rc.1]`
|
|
257
|
+
- Beta: `## [v9.6.0-beta.2]`
|
|
181
258
|
|
|
182
|
-
|
|
259
|
+
4. **Always collapse prior prereleases into the current prerelease** (this is the default behavior):
|
|
260
|
+
- Combine all prior prerelease changelog entries into the new prerelease version section
|
|
261
|
+
- Remove previous prerelease version sections (e.g., remove `## [v9.6.0-rc.0]` when creating `## [v9.6.0-rc.1]`)
|
|
262
|
+
- Add any new user-visible changes from commits since the last prerelease
|
|
263
|
+
- Update version diff links to point from the last stable version to the new prerelease
|
|
264
|
+
- This keeps the changelog clean with a single prerelease section that accumulates all changes since the last stable release
|
|
183
265
|
|
|
184
|
-
|
|
266
|
+
### For Prerelease to Stable Version Release
|
|
185
267
|
|
|
186
|
-
|
|
187
|
-
- Maintains detailed history of what changed in each beta
|
|
268
|
+
When releasing from prerelease to a stable version (e.g., v9.6.0-rc.1 → v9.6.0):
|
|
188
269
|
|
|
189
|
-
**
|
|
270
|
+
1. **Remove all prerelease version labels** from the changelog:
|
|
271
|
+
- Change `## [v9.6.0-rc.0]`, `## [v9.6.0-rc.1]`, etc. to a single `## [v9.6.0]` section
|
|
272
|
+
- Also handle beta versions: `## [v9.6.0-beta.1]` etc.
|
|
273
|
+
- Combine all prerelease entries into the stable release section
|
|
190
274
|
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
275
|
+
2. **Consolidate duplicate entries**:
|
|
276
|
+
- If bug fixes or changes were made to features introduced in earlier prereleases, keep only the final state
|
|
277
|
+
- Remove redundant changelog entries for fixes to prerelease features
|
|
278
|
+
- Keep the most recent/accurate description of each change
|
|
194
279
|
|
|
195
|
-
|
|
280
|
+
3. **Update version diff links** at the bottom to point to the stable version
|
|
196
281
|
|
|
197
282
|
## Examples
|
|
198
283
|
|
data/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
Changes since the last non-beta release.
|
|
13
13
|
|
|
14
|
-
## [v9.6.0-rc.
|
|
14
|
+
## [v9.6.0-rc.2] - March 7, 2026
|
|
15
15
|
|
|
16
16
|
### Security
|
|
17
17
|
|
|
@@ -72,7 +72,7 @@ Changes since the last non-beta release.
|
|
|
72
72
|
- **Improved error message when manifest is empty or missing**. [PR #872](https://github.com/shakacode/shakapacker/pull/872) by [justin808](https://github.com/justin808). When the bundler is still compiling (empty manifest) or hasn't run yet (missing manifest file), users now see clear, actionable error messages instead of the generic 7-point checklist.
|
|
73
73
|
- **Fixed NODE_ENV=test causing DefinePlugin warnings**. [PR #870](https://github.com/shakacode/shakapacker/pull/870) by [justin808](https://github.com/justin808). When RAILS_ENV=test, Shakapacker now sets NODE_ENV=development instead of NODE_ENV=test. This prevents webpack/rspack DefinePlugin conflicts since these bundlers only recognize "development" and "production" as valid NODE_ENV values.
|
|
74
74
|
- **Fixed `--json` flag output being corrupted by log messages**. [PR #869](https://github.com/shakacode/shakapacker/pull/869) by [justin808](https://github.com/justin808). When `--json` is in the command arguments, `[Shakapacker]` log messages are now written to stderr instead of stdout, keeping stdout clean for valid JSON output. This allows `bin/shakapacker --profile --json` to be piped to tools like `webpack-bundle-analyzer`. Normal (non-JSON) usage is unchanged. Resolves [#868](https://github.com/shakacode/shakapacker/issues/868).
|
|
75
|
-
- **Require explicit truthy values for
|
|
75
|
+
- **Require explicit truthy values for all installer env vars**. [PR #926](https://github.com/shakacode/shakapacker/pull/926), [PR #943](https://github.com/shakacode/shakapacker/pull/943) by [justin808](https://github.com/justin808). Previously, any set value (including `"false"` or `"0"`) would activate these flags. Now only explicit truthy values (`true`, `1`, `yes`, case-insensitive) are recognized for `SKIP`, `FORCE`, `USE_BABEL_PACKAGES`, `SHAKAPACKER_USE_TYPESCRIPT`, and `SKIP_COMMON_LOADERS`. This behavior change may require CI/scripts that relied on arbitrary non-empty values to switch to recognized truthy values like `true`.
|
|
76
76
|
|
|
77
77
|
### Documentation
|
|
78
78
|
|
|
@@ -868,8 +868,8 @@ Note: [Rubygem is 6.3.0.pre.rc.1](https://rubygems.org/gems/shakapacker/versions
|
|
|
868
868
|
|
|
869
869
|
See [CHANGELOG.md in rails/webpacker (up to v5.4.3)](https://github.com/rails/webpacker/blob/master/CHANGELOG.md)
|
|
870
870
|
|
|
871
|
-
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v9.6.0-rc.
|
|
872
|
-
[v9.6.0-rc.
|
|
871
|
+
[Unreleased]: https://github.com/shakacode/shakapacker/compare/v9.6.0-rc.2...main
|
|
872
|
+
[v9.6.0-rc.2]: https://github.com/shakacode/shakapacker/compare/v9.5.0...v9.6.0-rc.2
|
|
873
873
|
[v9.5.0]: https://github.com/shakacode/shakapacker/compare/v9.4.0...v9.5.0
|
|
874
874
|
[v9.4.0]: https://github.com/shakacode/shakapacker/compare/v9.3.4...v9.4.0
|
|
875
875
|
[v9.3.4]: https://github.com/shakacode/shakapacker/compare/v9.3.3...v9.3.4
|
data/docs/releasing.md
CHANGED
|
@@ -9,7 +9,7 @@ This guide is for Shakapacker maintainers who need to publish a new release.
|
|
|
9
9
|
```bash
|
|
10
10
|
bundle install # Installs gem-release
|
|
11
11
|
yarn global add release-it # Installs release-it for npm publishing
|
|
12
|
-
gh --version # Required
|
|
12
|
+
gh --version # Required for automatic GitHub release creation
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
2. **Ensure you have publishing access:**
|
|
@@ -19,24 +19,37 @@ This guide is for Shakapacker maintainers who need to publish a new release.
|
|
|
19
19
|
3. **Enable 2FA on both platforms:**
|
|
20
20
|
- npm: 2FA is required for publishing
|
|
21
21
|
- RubyGems: 2FA is required for publishing
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
4. **Authenticate GitHub CLI:**
|
|
23
24
|
- Run `gh auth login` and ensure your account/token has write access to this repository
|
|
25
|
+
- Required for automatic GitHub release creation after publishing
|
|
24
26
|
|
|
25
27
|
## Release Process
|
|
26
28
|
|
|
27
|
-
### 1.
|
|
29
|
+
### 1. Update the Changelog
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
**Always update CHANGELOG.md before running the release task.** The release task reads the version from CHANGELOG.md and automatically creates a GitHub release from the changelog section.
|
|
30
32
|
|
|
31
33
|
1. Ensure all desired changes are merged to `main` branch
|
|
32
|
-
2.
|
|
34
|
+
2. Run `/update-changelog release` (or `rc` or `beta` for prereleases) to:
|
|
35
|
+
- Find merged PRs missing from the changelog
|
|
36
|
+
- Add changelog entries under the appropriate category headings
|
|
37
|
+
- Auto-compute the next version based on changes (breaking → major, features → minor, fixes → patch)
|
|
38
|
+
- Stamp the version header (e.g., `## [v9.6.0] - March 7, 2026`)
|
|
39
|
+
3. Review the changelog entries and verify the computed version
|
|
40
|
+
4. Commit and push CHANGELOG.md
|
|
41
|
+
|
|
42
|
+
If you forget this step, the release task will print a warning and the GitHub release will need to be created manually afterward using `sync_github_release`.
|
|
33
43
|
|
|
34
44
|
### 2. Run the Release Task
|
|
35
45
|
|
|
36
|
-
The
|
|
46
|
+
The simplest way to release is with no arguments — the task reads the version from CHANGELOG.md:
|
|
37
47
|
|
|
38
48
|
```bash
|
|
39
|
-
#
|
|
49
|
+
# Recommended: reads version from CHANGELOG.md (requires step 1)
|
|
50
|
+
bundle exec rake create_release
|
|
51
|
+
|
|
52
|
+
# For a specific version (overrides CHANGELOG.md detection)
|
|
40
53
|
bundle exec rake "create_release[9.1.0]"
|
|
41
54
|
|
|
42
55
|
# For a beta release (note: use period, not dash)
|
|
@@ -45,14 +58,6 @@ bundle exec rake "create_release[9.2.0.beta.1]" # Creates npm package 9.2.0-bet
|
|
|
45
58
|
# For a release candidate
|
|
46
59
|
bundle exec rake "create_release[9.6.0.rc.0]"
|
|
47
60
|
|
|
48
|
-
# Auto-calculate next prerelease and confirm before publishing
|
|
49
|
-
bundle exec rake "create_prerelease[9.6.0]" # defaults to rc -> 9.6.0.rc.0 or 9.6.0.rc.1, etc.
|
|
50
|
-
bundle exec rake "create_prerelease[9.6.0,rc]" # -> 9.6.0.rc.0 or 9.6.0.rc.1, etc.
|
|
51
|
-
bundle exec rake "create_prerelease[9.6.0,beta]" # -> 9.6.0.beta.0 or 9.6.0.beta.1, etc.
|
|
52
|
-
|
|
53
|
-
# For a patch version bump (auto-increments)
|
|
54
|
-
bundle exec rake create_release # prompts to confirm computed patch version
|
|
55
|
-
|
|
56
61
|
# Dry run to test without publishing
|
|
57
62
|
bundle exec rake "create_release[9.1.0,true]"
|
|
58
63
|
|
|
@@ -61,9 +66,17 @@ RELEASE_VERSION_POLICY_OVERRIDE=true bundle exec rake "create_release[9.1.0]"
|
|
|
61
66
|
bundle exec rake "create_release[9.1.0,false,true]"
|
|
62
67
|
```
|
|
63
68
|
|
|
69
|
+
When called with no arguments, `create_release`:
|
|
70
|
+
|
|
71
|
+
1. Reads the first versioned header from CHANGELOG.md (e.g., `## [v9.6.0]`)
|
|
72
|
+
2. Compares it to the current gem version
|
|
73
|
+
3. If the changelog version is newer, prompts for confirmation and uses it
|
|
74
|
+
4. If no new version is found, falls back to a patch bump
|
|
75
|
+
|
|
64
76
|
Dry runs use a temporary git worktree so version bumps and installs do not modify your current checkout.
|
|
65
77
|
|
|
66
|
-
`create_release`
|
|
78
|
+
`create_release` validates release-version policy before publishing:
|
|
79
|
+
|
|
67
80
|
- Target version must be greater than the latest tagged release.
|
|
68
81
|
- If the versioned target changelog section exists (`## [vX.Y.Z...]`; not `UNRELEASED`), it maps to expected bump type:
|
|
69
82
|
- Breaking changes => major bump
|
|
@@ -72,8 +85,9 @@ Dry runs use a temporary git worktree so version bumps and installs do not modif
|
|
|
72
85
|
- Other headings => no inferred bump level (consistency check is skipped)
|
|
73
86
|
|
|
74
87
|
Use override only when needed:
|
|
88
|
+
|
|
75
89
|
- `RELEASE_VERSION_POLICY_OVERRIDE=true`
|
|
76
|
-
- Or task arg override (`create_release[..., ..., true]
|
|
90
|
+
- Or task arg override (`create_release[..., ..., true]`)
|
|
77
91
|
|
|
78
92
|
### 3. What the Release Task Does
|
|
79
93
|
|
|
@@ -81,6 +95,7 @@ The `create_release` task automatically:
|
|
|
81
95
|
|
|
82
96
|
1. **Validates release prerequisites**:
|
|
83
97
|
- Verifies npm authentication
|
|
98
|
+
- Warns if CHANGELOG.md section is missing for the target version
|
|
84
99
|
2. **Pulls latest changes** from the repository
|
|
85
100
|
3. **Bumps version numbers** in:
|
|
86
101
|
- `lib/shakapacker/version.rb` (Ruby gem version)
|
|
@@ -95,31 +110,9 @@ The `create_release` task automatically:
|
|
|
95
110
|
- Runs `bundle install` to update `Gemfile.lock`
|
|
96
111
|
- Runs `npm install` to update `package-lock.json` (yarn.lock may also be updated for multi-package-manager compatibility testing)
|
|
97
112
|
7. **Commits and pushes lockfile changes** automatically
|
|
113
|
+
8. **Creates GitHub release** from CHANGELOG.md (if the matching section exists)
|
|
98
114
|
|
|
99
|
-
### 4.
|
|
100
|
-
|
|
101
|
-
If you want GitHub Releases, do that as a separate step after publishing.
|
|
102
|
-
Requires GitHub CLI (`gh`) with write access to this repository:
|
|
103
|
-
|
|
104
|
-
Legacy note: `SKIP_GITHUB_RELEASE=true` is no longer used by release tasks. GitHub release creation is now an explicit, separate step via `sync_github_release`.
|
|
105
|
-
|
|
106
|
-
1. Run `bundle exec rake update_changelog`
|
|
107
|
-
2. Update `CHANGELOG.md` with the published version section
|
|
108
|
-
- For prerelease entries, use npm semver header format with dashes, for example `## [v9.6.0-rc.1]`
|
|
109
|
-
3. Commit `CHANGELOG.md`
|
|
110
|
-
4. Run:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# Stable
|
|
114
|
-
bundle exec rake "sync_github_release[9.6.0]"
|
|
115
|
-
|
|
116
|
-
# Prerelease
|
|
117
|
-
bundle exec rake "sync_github_release[9.6.0.rc.1]"
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
`sync_github_release` reads release notes from the matching `CHANGELOG.md` section and creates/updates the GitHub release for the corresponding tag.
|
|
121
|
-
|
|
122
|
-
### 5. Version Format
|
|
115
|
+
### 4. Version Format
|
|
123
116
|
|
|
124
117
|
**Important:** Use Ruby gem version format (no dashes):
|
|
125
118
|
|
|
@@ -131,6 +124,11 @@ The task automatically converts Ruby gem format to npm semver format:
|
|
|
131
124
|
- Ruby: `9.2.0.beta.1` → npm: `9.2.0-beta.1`
|
|
132
125
|
- Ruby: `9.0.0.rc.2` → npm: `9.0.0-rc.2`
|
|
133
126
|
|
|
127
|
+
**CHANGELOG.md headers** use npm semver format (with dashes):
|
|
128
|
+
|
|
129
|
+
- `## [v9.6.0-rc.1]` — correct (matches git tag format)
|
|
130
|
+
- `## [v9.6.0.rc.1]` — wrong (RubyGems format, will not be found by release tasks)
|
|
131
|
+
|
|
134
132
|
**Examples:**
|
|
135
133
|
|
|
136
134
|
```bash
|
|
@@ -143,27 +141,25 @@ bundle exec rake "create_release[9.2.0.beta.1]" # Gem: 9.2.0.beta.1, npm: 9.2.0
|
|
|
143
141
|
# Release candidate
|
|
144
142
|
bundle exec rake "create_release[10.0.0.rc.1]" # Gem: 10.0.0.rc.1, npm: 10.0.0-rc.1
|
|
145
143
|
|
|
146
|
-
#
|
|
147
|
-
bundle exec rake
|
|
144
|
+
# Prerelease: use /update-changelog rc first, then create_release reads it
|
|
145
|
+
bundle exec rake create_release # reads v10.0.0-rc.0 from CHANGELOG.md
|
|
148
146
|
```
|
|
149
147
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
### 6. During the Release
|
|
148
|
+
### 5. During the Release
|
|
153
149
|
|
|
154
150
|
1. When prompted for **npm OTP**, enter your 2FA code from your authenticator app
|
|
155
151
|
2. Accept defaults for release-it options
|
|
156
152
|
3. When prompted for **RubyGems OTP**, enter your 2FA code
|
|
157
|
-
4. If using
|
|
158
|
-
5.
|
|
159
|
-
6. The script will automatically
|
|
153
|
+
4. If using `create_release` with no version, confirm the version detected from CHANGELOG.md (or the computed patch version)
|
|
154
|
+
5. The script will automatically commit and push lockfile updates
|
|
155
|
+
6. The script will automatically create a GitHub release (if CHANGELOG.md section exists)
|
|
160
156
|
|
|
161
|
-
###
|
|
157
|
+
### 6. After Release
|
|
162
158
|
|
|
163
159
|
1. Verify the release on:
|
|
164
160
|
- [npm](https://www.npmjs.com/package/shakapacker)
|
|
165
161
|
- [RubyGems](https://rubygems.org/gems/shakapacker)
|
|
166
|
-
- [GitHub releases](https://github.com/shakacode/shakapacker/releases)
|
|
162
|
+
- [GitHub releases](https://github.com/shakacode/shakapacker/releases)
|
|
167
163
|
|
|
168
164
|
2. Check that the lockfile commit was pushed:
|
|
169
165
|
|
|
@@ -177,6 +173,25 @@ The `create_prerelease` task defaults to `rc` if prerelease type is omitted. Use
|
|
|
177
173
|
- Tweet about major releases
|
|
178
174
|
- Update documentation if needed
|
|
179
175
|
|
|
176
|
+
### Syncing GitHub Releases Manually
|
|
177
|
+
|
|
178
|
+
If the automatic GitHub release creation was skipped (e.g., CHANGELOG.md section was missing during release), you can create it manually after updating the changelog:
|
|
179
|
+
|
|
180
|
+
1. Update `CHANGELOG.md` with the published version section
|
|
181
|
+
- For prerelease entries, use npm semver header format with dashes, for example `## [v9.6.0-rc.1]`
|
|
182
|
+
2. Commit and push `CHANGELOG.md`
|
|
183
|
+
3. Run:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Stable
|
|
187
|
+
bundle exec rake "sync_github_release[9.6.0]"
|
|
188
|
+
|
|
189
|
+
# Prerelease
|
|
190
|
+
bundle exec rake "sync_github_release[9.6.0.rc.1]"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`sync_github_release` reads release notes from the matching `CHANGELOG.md` section and creates/updates the GitHub release for the corresponding tag.
|
|
194
|
+
|
|
180
195
|
## Troubleshooting
|
|
181
196
|
|
|
182
197
|
### Uncommitted Changes After Release
|
|
@@ -202,7 +217,7 @@ If publishing fails partway through:
|
|
|
202
217
|
|
|
203
218
|
### GitHub Release Sync Fails
|
|
204
219
|
|
|
205
|
-
If package publishing succeeds but
|
|
220
|
+
If package publishing succeeds but GitHub release creation fails:
|
|
206
221
|
|
|
207
222
|
1. Fix GitHub auth (`gh auth login`) or permissions
|
|
208
223
|
2. Ensure `CHANGELOG.md` has matching header `## [vX.Y.Z...]` (npm format for prereleases)
|
|
@@ -212,14 +227,6 @@ If package publishing succeeds but `sync_github_release` fails:
|
|
|
212
227
|
bundle exec rake "sync_github_release[<gem_version>]"
|
|
213
228
|
```
|
|
214
229
|
|
|
215
|
-
### Legacy `SKIP_GITHUB_RELEASE` Usage
|
|
216
|
-
|
|
217
|
-
If your CI or local runbook still sets `SKIP_GITHUB_RELEASE=true`:
|
|
218
|
-
|
|
219
|
-
1. `create_release` and `create_prerelease` now always skip GitHub release creation by design
|
|
220
|
-
2. Remove `SKIP_GITHUB_RELEASE` from scripts to avoid confusion
|
|
221
|
-
3. Run `sync_github_release` explicitly when you want to create or update a GitHub release
|
|
222
|
-
|
|
223
230
|
### Wrong Version Format
|
|
224
231
|
|
|
225
232
|
If you accidentally use npm format (with dashes):
|
data/lib/shakapacker/version.rb
CHANGED
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shakapacker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.6.0.rc.
|
|
4
|
+
version: 9.6.0.rc.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -426,7 +426,7 @@ homepage: https://github.com/shakacode/shakapacker
|
|
|
426
426
|
licenses:
|
|
427
427
|
- MIT
|
|
428
428
|
metadata:
|
|
429
|
-
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.6.0-rc.
|
|
429
|
+
source_code_uri: https://github.com/shakacode/shakapacker/tree/v9.6.0-rc.2
|
|
430
430
|
rdoc_options: []
|
|
431
431
|
require_paths:
|
|
432
432
|
- lib
|