Skip to content

Commit 4f18aa5

Browse files
linting
1 parent 730798c commit 4f18aa5

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

docs/contributor-info/releasing.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ rake release[version,dry_run,registry,skip_push]
1919
**Arguments:**
2020

2121
1. **`version`** (required): Version bump type or explicit version
22+
2223
- Bump types: `patch`, `minor`, `major`
2324
- Explicit: `16.2.0` (rubygem format, no dashes)
2425

2526
2. **`dry_run`** (optional): `true` to preview changes without releasing
27+
2628
- Default: `false`
2729

2830
3. **`registry`** (optional): Publishing registry for testing
31+
2932
- `verdaccio`: Publish all NPM packages to local Verdaccio (skips RubyGems)
3033
- `npm`: Normal release to npmjs.org + rubygems.org (default)
3134

@@ -50,33 +53,35 @@ rake release[patch,false,npm,skip_push] # Release but don't push to GitHub
5053
The release task publishes 5 packages with unified versioning:
5154

5255
**PUBLIC (npmjs.org + rubygems.org):**
56+
5357
1. **react-on-rails** - NPM package
5458
2. **react-on-rails-pro** - NPM package
5559
3. **react_on_rails** - RubyGem
5660

57-
**PRIVATE (GitHub Packages):**
58-
4. **@shakacode-tools/react-on-rails-pro-node-renderer** - NPM package
59-
5. **react_on_rails_pro** - RubyGem
61+
**PRIVATE (GitHub Packages):** 4. **@shakacode-tools/react-on-rails-pro-node-renderer** - NPM package 5. **react_on_rails_pro** - RubyGem
6062

6163
### Version Synchronization
6264

6365
The task updates versions in all the following files:
6466

6567
**Core package:**
68+
6669
- `lib/react_on_rails/version.rb` (source of truth for all packages)
6770
- `package.json` (root workspace)
6871
- `packages/react-on-rails/package.json`
6972
- `Gemfile.lock` (root)
7073
- `spec/dummy/Gemfile.lock`
7174

7275
**Pro package:**
76+
7377
- `react_on_rails_pro/lib/react_on_rails_pro/version.rb` (VERSION only, not PROTOCOL_VERSION)
7478
- `react_on_rails_pro/package.json` (node-renderer)
7579
- `packages/react-on-rails-pro/package.json` (+ dependency version)
7680
- `react_on_rails_pro/Gemfile.lock`
7781
- `react_on_rails_pro/spec/dummy/Gemfile.lock`
7882

7983
**Note:**
84+
8085
- `react_on_rails_pro.gemspec` dynamically references `ReactOnRails::VERSION`
8186
- `react-on-rails-pro` NPM dependency is pinned to exact version (e.g., `"react-on-rails": "16.2.0"`)
8287

@@ -143,11 +148,13 @@ After a successful release, you'll see instructions to:
143148
You must be logged in and have publish permissions:
144149

145150
**For public packages (npmjs.org):**
151+
146152
```bash
147153
npm login
148154
```
149155

150156
**For private packages (GitHub Packages):**
157+
151158
- Get a GitHub personal access token with `write:packages` scope
152159
- Add to `~/.npmrc`:
153160
```
@@ -162,9 +169,11 @@ npm login
162169
### RubyGems Publishing
163170

164171
**For public gem (rubygems.org):**
172+
165173
- Standard RubyGems credentials via `gem push`
166174

167175
**For private gem (GitHub Packages):**
176+
168177
- Add to `~/.gem/credentials`:
169178
```
170179
:github: Bearer <GITHUB_TOKEN>
@@ -173,6 +182,7 @@ npm login
173182
### Ruby Version Management
174183

175184
The script automatically detects and switches Ruby versions when needed:
185+
176186
- Supports: RVM, rbenv, asdf
177187
- Set via `RUBY_VERSION_MANAGER` environment variable (default: `rvm`)
178188
- Example: Pro dummy app requires Ruby 3.3.7, script auto-switches from 3.3.0
@@ -186,17 +196,20 @@ This task depends on the `gem-release` Ruby gem, which is installed via `bundle
186196
Before releasing to production, test the release process locally:
187197

188198
1. Install and start Verdaccio:
199+
189200
```bash
190201
npm install -g verdaccio
191202
verdaccio
192203
```
193204

194205
2. Run release with verdaccio registry:
206+
195207
```bash
196208
rake release[patch,false,verdaccio]
197209
```
198210

199211
3. This will:
212+
200213
- Publish all 3 NPM packages to local Verdaccio
201214
- Skip RubyGem publishing
202215
- Update version files (revert manually after testing)

rakelib/task_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def detect_bundler_ruby_version(dir)
8888
end
8989
end
9090

91-
unless exit_status == 0
91+
unless exit_status.zero?
9292
puts " ⚠️ Failed to detect Ruby version in #{dir}"
9393
puts " Error: #{output.strip}" unless output.strip.empty?
9494
return nil

react_on_rails_pro/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,12 @@ You need authentication for both public and private package registries:
301301
**Private packages (GitHub Packages):**
302302
- Get a GitHub personal access token with `write:packages` scope
303303
- Configure `~/.npmrc`:
304-
```
304+
```ini
305305
//npm.pkg.github.com/:_authToken=<TOKEN>
306306
always-auth=true
307307
```
308308
- Configure `~/.gem/credentials`:
309-
```
309+
```yaml
310310
:github: Bearer <GITHUB_TOKEN>
311311
```
312312
- Set environment variable: `export GITHUB_TOKEN=<TOKEN>`

react_on_rails_pro/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ PATH
2020
PATH
2121
remote: .
2222
specs:
23-
react_on_rails_pro (4.0.0)
23+
react_on_rails_pro (16.1.1)
2424
addressable
2525
connection_pool
2626
execjs (~> 2.9)
2727
httpx (~> 1.5)
2828
jwt (~> 2.7)
2929
rainbow
30-
react_on_rails (>= 16.0.0)
30+
react_on_rails (= 16.1.1)
3131

3232
GEM
3333
remote: https://rubygems.org/

0 commit comments

Comments
 (0)