Skip to content

Commit c9e9ca0

Browse files
Update release documentation and remove deprecated pro-specific release files
Documentation updates: - Update root releasing.md with all 5 packages and 4 parameters - Add comprehensive requirements section (NPM, RubyGems, GitHub Packages auth) - Add Ruby version management documentation - Add Testing with Verdaccio section - Update version synchronization to include all files - Clarify public vs private package publishing - Update pro CONTRIBUTING.md to reference root release task - Replace pro releasing.md with redirect to root documentation - Delete deprecated pro rakelib/release.rake - Delete deprecated pro script/release All release documentation now correctly reflects unified versioning and the single release script at repository root.
1 parent 9d35877 commit c9e9ca0

File tree

5 files changed

+186
-119
lines changed

5 files changed

+186
-119
lines changed

docs/contributor-info/releasing.md

Lines changed: 111 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install and Release
22

3-
We're releasing this as a combined Ruby gem plus two NPM packages. We keep the version numbers in sync across all packages.
3+
We're releasing this as a unified release with 5 packages total. We keep the version numbers in sync across all packages using unified versioning.
44

55
## Testing the Gem before Release from a Rails App
66

@@ -13,41 +13,72 @@ Run `rake -D release` to see instructions on how to release via the rake task.
1313
### Release Command
1414

1515
```bash
16-
rake release[gem_version,dry_run]
16+
rake release[version,dry_run,registry,skip_push]
1717
```
1818

1919
**Arguments:**
2020

21-
- `gem_version`: The new version in rubygem format (no dashes). Pass no argument to automatically perform a patch version bump.
22-
- `dry_run`: Optional. Pass `true` to see what would happen without actually releasing.
21+
1. **`version`** (required): Version bump type or explicit version
22+
- Bump types: `patch`, `minor`, `major`
23+
- Explicit: `16.2.0` (rubygem format, no dashes)
2324

24-
**Example:**
25+
2. **`dry_run`** (optional): `true` to preview changes without releasing
26+
- Default: `false`
27+
28+
3. **`registry`** (optional): Publishing registry for testing
29+
- `verdaccio`: Publish all NPM packages to local Verdaccio (skips RubyGems)
30+
- `npm`: Normal release to npmjs.org + rubygems.org (default)
31+
32+
4. **`skip_push`** (optional): Skip git push to remote
33+
- `skip_push`: Don't push commits/tags to remote
34+
- Default: pushes to remote
35+
36+
**Examples:**
2537

2638
```bash
27-
rake release[16.2.0] # Release version 16.2.0
28-
rake release[16.2.0,true] # Dry run to preview changes
29-
rake release # Auto-bump patch version
39+
rake release[patch] # Bump patch version (16.1.1 → 16.1.2)
40+
rake release[minor] # Bump minor version (16.1.1 → 16.2.0)
41+
rake release[major] # Bump major version (16.1.1 → 17.0.0)
42+
rake release[16.2.0] # Set explicit version
43+
rake release[16.2.0,true] # Dry run to preview changes
44+
rake release[16.2.0,false,verdaccio] # Test with local Verdaccio
45+
rake release[patch,false,npm,skip_push] # Release but don't push to GitHub
3046
```
3147

3248
### What Gets Released
3349

34-
The release task publishes three packages with the same version number:
50+
The release task publishes 5 packages with unified versioning:
51+
52+
**PUBLIC (npmjs.org + rubygems.org):**
53+
1. **react-on-rails** - NPM package
54+
2. **react-on-rails-pro** - NPM package
55+
3. **react_on_rails** - RubyGem
3556

36-
1. **react-on-rails** NPM package
37-
2. **react-on-rails-pro** NPM package
38-
3. **react_on_rails** Ruby gem
57+
**PRIVATE (GitHub Packages):**
58+
4. **@shakacode-tools/react-on-rails-pro-node-renderer** - NPM package
59+
5. **react_on_rails_pro** - RubyGem
3960

4061
### Version Synchronization
4162

4263
The task updates versions in all the following files:
4364

44-
- `lib/react_on_rails/version.rb` (source of truth)
65+
**Core package:**
66+
- `lib/react_on_rails/version.rb` (source of truth for all packages)
4567
- `package.json` (root workspace)
4668
- `packages/react-on-rails/package.json`
47-
- `packages/react-on-rails-pro/package.json` (both version field and react-on-rails dependency)
69+
- `Gemfile.lock` (root)
4870
- `spec/dummy/Gemfile.lock`
4971

50-
**Note:** The `react-on-rails-pro` package declares an exact version dependency on `react-on-rails` (e.g., `"react-on-rails": "16.2.0"`). This ensures users install compatible versions of both packages.
72+
**Pro package:**
73+
- `react_on_rails_pro/lib/react_on_rails_pro/version.rb` (VERSION only, not PROTOCOL_VERSION)
74+
- `react_on_rails_pro/package.json` (node-renderer)
75+
- `packages/react-on-rails-pro/package.json` (+ dependency version)
76+
- `react_on_rails_pro/Gemfile.lock`
77+
- `react_on_rails_pro/spec/dummy/Gemfile.lock`
78+
79+
**Note:**
80+
- `react_on_rails_pro.gemspec` dynamically references `ReactOnRails::VERSION`
81+
- `react-on-rails-pro` NPM dependency is pinned to exact version (e.g., `"react-on-rails": "16.2.0"`)
5182

5283
### Pre-release Versions
5384

@@ -107,14 +138,77 @@ After a successful release, you'll see instructions to:
107138

108139
## Requirements
109140

110-
This task depends on the `gem-release` Ruby gem, which is installed via `bundle install`.
141+
### NPM Publishing
111142

112-
For NPM publishing, you must be logged in to npm and have publish permissions for both packages:
143+
You must be logged in and have publish permissions:
113144

145+
**For public packages (npmjs.org):**
114146
```bash
115147
npm login
116148
```
117149

150+
**For private packages (GitHub Packages):**
151+
- Get a GitHub personal access token with `write:packages` scope
152+
- Add to `~/.npmrc`:
153+
```
154+
//npm.pkg.github.com/:_authToken=<TOKEN>
155+
always-auth=true
156+
```
157+
- Set environment variable:
158+
```bash
159+
export GITHUB_TOKEN=<TOKEN>
160+
```
161+
162+
### RubyGems Publishing
163+
164+
**For public gem (rubygems.org):**
165+
- Standard RubyGems credentials via `gem push`
166+
167+
**For private gem (GitHub Packages):**
168+
- Add to `~/.gem/credentials`:
169+
```
170+
:github: Bearer <GITHUB_TOKEN>
171+
```
172+
173+
### Ruby Version Management
174+
175+
The script automatically detects and switches Ruby versions when needed:
176+
- Supports: RVM, rbenv, asdf
177+
- Set via `RUBY_VERSION_MANAGER` environment variable (default: `rvm`)
178+
- Example: Pro dummy app requires Ruby 3.3.7, script auto-switches from 3.3.0
179+
180+
### Dependencies
181+
182+
This task depends on the `gem-release` Ruby gem, which is installed via `bundle install`.
183+
184+
## Testing with Verdaccio
185+
186+
Before releasing to production, test the release process locally:
187+
188+
1. Install and start Verdaccio:
189+
```bash
190+
npm install -g verdaccio
191+
verdaccio
192+
```
193+
194+
2. Run release with verdaccio registry:
195+
```bash
196+
rake release[patch,false,verdaccio]
197+
```
198+
199+
3. This will:
200+
- Publish all 3 NPM packages to local Verdaccio
201+
- Skip RubyGem publishing
202+
- Update version files (revert manually after testing)
203+
204+
4. Test installing from Verdaccio:
205+
```bash
206+
npm set registry http://localhost:4873/
207+
npm install [email protected]
208+
# Reset when done:
209+
npm config delete registry
210+
```
211+
118212
## Troubleshooting
119213

120214
### Dry Run First

react_on_rails_pro/CONTRIBUTING.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,51 @@ TRACE_REACT_ON_RAILS=true && foreman start -f Procfile.dev
282282
```
283283

284284
# Releasing
285-
Contact Justin Gordon, [[email protected]](mailto:[email protected]).
286285

287-
> [!NOTE]
288-
> These files need to include auth tokens to [publish to Github Packages](https://docs.github.com/en/enterprise-server%403.10/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry):
289-
> 1. `~/.npmrc`
290-
> 2. `~/.gem/credentials`
286+
⚠️ **The release process has moved to the repository root.**
287+
288+
React on Rails Pro is now released together with React on Rails using unified versioning.
289+
All packages (core + pro) are released together with the same version number.
290+
291+
Contact Justin Gordon, [[email protected]](mailto:[email protected]) for release permissions.
292+
293+
## Prerequisites
294+
295+
You need authentication for both public and private package registries:
296+
297+
**Public packages (npmjs.org + rubygems.org):**
298+
- NPM: Run `npm login`
299+
- RubyGems: Standard credentials via `gem push`
300+
301+
**Private packages (GitHub Packages):**
302+
- Get a GitHub personal access token with `write:packages` scope
303+
- Configure `~/.npmrc`:
304+
```
305+
//npm.pkg.github.com/:_authToken=<TOKEN>
306+
always-auth=true
307+
```
308+
- Configure `~/.gem/credentials`:
309+
```
310+
:github: Bearer <GITHUB_TOKEN>
311+
```
312+
- Set environment variable: `export GITHUB_TOKEN=<TOKEN>`
313+
314+
## Release Command
315+
316+
From the **repository root**, run:
291317

292-
Then run a command like:
293318
```bash
294-
bundle exec rake release\[4.0.0.rc.1\]
319+
# Full release
320+
cd /path/to/react_on_rails
321+
rake release[4.0.0]
322+
323+
# Dry run first
324+
rake release[4.0.0,true]
325+
326+
# Test with Verdaccio
327+
rake release[4.0.0,false,verdaccio]
295328
```
329+
330+
For complete documentation, see:
331+
- [Root Release Documentation](../docs/contributor-info/releasing.md)
332+
- Run `rake -D release` for inline help
Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
# Install and Release
2-
Github packages and gems are used for distribution from the https://github.com/shakacode-tools/react_on_rails_pro repo.
3-
1. Check that the CHANGELOG.md is updated
4-
2. See below for Prerequisites and then run the release command like this
1+
# Releasing React on Rails Pro
52

6-
```
7-
rake release[1.5.7]
8-
```
3+
⚠️ **This documentation is outdated.**
94

10-
or for a beta release. Note the period, not dash, before the 'beta'.
5+
React on Rails Pro is now released together with React on Rails using a unified release script.
116

12-
```
13-
rake release[1.5.6.beta.2]
14-
```
7+
## Current Release Process
158

16-
## Testing the Gem before Release from a Rails App
17-
See [Contributing](https://github.com/shakacode/react_on_rails_pro/blob/master/CONTRIBUTING.md)
9+
Please refer to the main release documentation:
1810

19-
### Prerequisites
20-
Before this command can be run, a bit of setup is required:
11+
👉 **[/docs/contributor-info/releasing.md](../../../docs/contributor-info/releasing.md)**
2112

22-
1. Get a Github personal access token that provides both Repo and write:packages access
23-
2. In `~/.npmrc`
24-
```
25-
//npm.pkg.github.com/:_authToken=<TOKEN>
26-
always-auth=true
27-
```
28-
3. Ensure that you set the ENV value when you will run the script. A `.envrc` is convenient for this.
13+
Or run from the repository root:
14+
15+
```bash
16+
cd .. && rake -D release
2917
```
30-
export GITHUB_TOKEN=<TOKEN>
18+
19+
## Quick Reference
20+
21+
```bash
22+
# From repository root (not from react_on_rails_pro/)
23+
cd /path/to/react_on_rails
24+
25+
# Release with version bump
26+
rake release[4.0.0]
27+
28+
# Dry run first (recommended)
29+
rake release[4.0.0,true]
30+
31+
# Test with local Verdaccio
32+
rake release[4.0.0,false,verdaccio]
3133
```
3234

33-
### Details
34-
1. See `/package.json` for how npm release and release-it know how to publish the package to Github
35-
2. See `/react_on_rails.gemspec` for the gem specification.
36-
3. See `/rakelib/release.rake` for details on how a release is done. The gem is set to publish to
37-
Github by the `gem_push_command`
35+
This unified script releases all 5 packages together:
36+
- react-on-rails (NPM)
37+
- react-on-rails-pro (NPM)
38+
- react_on_rails (RubyGem)
39+
- @shakacode-tools/react-on-rails-pro-node-renderer (NPM, GitHub Packages)
40+
- react_on_rails_pro (RubyGem, GitHub Packages)

react_on_rails_pro/rakelib/release.rake

Lines changed: 0 additions & 52 deletions
This file was deleted.

react_on_rails_pro/script/release

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)