You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Remix v2 is now in maintenance mode and developed strictly on the `v2` branch.
5
+
> v2 changes should never commit to, merge to, or merge from the `main`/`dev` branches.
36
6
37
7
## Releases
38
8
39
-
New releases should be created from release branches originating from the `dev` branch. When you are ready to begin the release process:
40
-
41
-
- Make sure you've pulled all of the changes from GitHub for both `dev` and `main` branches
42
-
- Check out the `dev` branch
43
-
- If needed, bump the dependencies to the correct React Router release
44
-
-`./scripts/bump-router-versions.sh [pre|latest]`
45
-
- Create a new release branch with the `release-` prefix
46
-
-`git checkout -b release-next`
47
-
-**IMPORTANT:** The `release-` prefix is important, as this is what triggers our GitHub CI workflow that will ultimately publish the release
48
-
- Merge `main` into the release branch
49
-
50
-
Changesets will do most of the heavy lifting for our releases. When changes are made to the codebase, an accompanying changeset file should be included to document the change. Those files will dictate how Changesets will version our packages and what shows up in the changelogs.
9
+
v2 releases are managed from a `release-v2` branch created from the `v2` branch. Changesets will do most of the heavy lifting for our releases. When changes are made to the codebase, an accompanying changeset file should be included to document the change. Those files will dictate how Changesets will version our packages and what shows up in the changelogs.
51
10
52
11
### Starting a new pre-release
53
12
54
-
- Ensure you are on the new `release-*` branch
55
-
- Enter Changesets pre-release mode using the `pre` tag: `pnpm changeset pre enter pre`
56
-
- Commit the change and push the `release-*` branch to GitHub
57
-
- Wait for the release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs
58
-
- Review the updated `CHANGELOG` files and make any adjustments necessary, then merge the PR into the `release-*` branch
- Once the PR is merged, the release workflow will publish the updated packages to npm
13
+
- Check out the `v2` branch and pull latest from GitHub
14
+
- If needed, bump the dependencies to the correct React Router release
15
+
-`./scripts/bump-router-versions.sh [pre|latest]`
16
+
- Create a new `release-v2` branch
17
+
-`git checkout -b release-v2`
18
+
- Enter Changesets pre-release mode using the `pre` tag
19
+
-`pnpm changeset pre enter pre`
20
+
- Commit the change and push the `release-v2` branch to GitHub
21
+
-`git commit -am "Enter prerelease mode"`
22
+
-`git push --set-upstream origin release-v2`
23
+
- Wait for the changesets release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs
24
+
- Merge the PR into the `release-v2` branch and the changesets action will publish the prerelease to `npm`
61
25
- At this point, you can begin crafting the release notes for the eventual stable release in the root `CHANGELOG.md` file in the repo
62
26
- Copy the template for a new release and update the version numbers and links accordingly
63
27
- Copy the relevant changelog entries from all packages into the release notes and adjust accordingly
64
-
- Commit these changes directly to the `release-*` branch - they will not trigger a new prerelease since they do not include a changeset
- Commit these changes and push directly to the `release-v2` branch - they will not trigger a new prerelease since they do not include a changeset
65
30
66
31
### Iterating a pre-release
67
32
68
33
You may need to make changes to a pre-release prior to publishing a final stable release. To do so:
69
34
70
-
-Make whatever changes you need
35
+
-Branch from `release-v2` and make whatever changes you need
71
36
- Create a new changeset: `pnpm changeset`
72
37
-**IMPORTANT:** This is required even if you ultimately don't want to include these changes in the logs
73
-
- Remember, changelogs can be edited prior to publishing, but the Changeset version script needs to see new changesets in order to create a new version
74
-
- Commit the changesets and push the `release-*` branch to GitHub
38
+
- Changelogs can be edited prior to publishing, but the Changeset version script needs to see new changesets in order to create a new prerelease version
39
+
- Commit the changesets to your branch
40
+
- PR and merge it to the `release-v2` branch
75
41
- Wait for the release workflow to finish and the Changesets action to open its PR that will increment all versions
76
-
- Review the PR, make any adjustments necessary, and merge it into the `release-*` branch
42
+
- Review the PR, make any adjustments necessary, and merge it into the `release-v2` branch
77
43
- Once the PR is merged, the release workflow will publish the updated packages to npm
78
44
- Make sure you copy over the new changeset contents into stable release notes in the root `CHANGELOG.md` file in the repo
79
45
80
46
### Publishing the stable release
81
47
82
-
- Exit Changesets pre-release mode: `pnpm changeset pre exit`
83
-
- Commit the edited `pre.json` file along with any unpublished changesets, and push the `release-*` branch to GitHub
48
+
- Exit Changesets pre-release mode in the `release-v2` branch:
49
+
-`pnpm changeset pre exit`
50
+
- Commit the edited `pre.json` file along with any unpublished changesets, and push the `release-v2` branch to GitHub
51
+
-`git commit -am "Exit prerelease mode"`
52
+
-`git push origin release-v2`
84
53
- Wait for the release workflow to finish - the Changesets action in the workflow will open a PR that will increment all versions and generate the changelogs for the stable release
85
54
- Review the updated `CHANGELOG` files and make any adjustments necessary
- Pull the latest `release-2` branch containing the PR you just merged
64
+
- Merge the `release-v2` branch into `v2`**using a non-fast-forward merge** and push it up to GitHub
65
+
-`git checkout v2; git merge --no-ff release-v2`
99
66
- Convert the `[email protected]` tag to a Release on GitHub with the name `v2.x.y` and add a deep-link to the release heading in `CHANGELOG.md`
100
-
101
-
### Hotfix releases
102
-
103
-
Hotfix releases follow the same process as standard releases above, but the `release-*` branch should be branched off latest `main` instead of `dev`. Once the stable hotfix is published, the `release-*` branch should be merged back into both `main` and `dev` just like a normal release.
67
+
- ⚠️ Make sure to uncheck the "Mark as latest" checkbox
104
68
105
69
### Experimental releases
106
70
@@ -113,37 +77,3 @@ Experimental releases use a [manually-triggered Github Actions workflow](./.gith
113
77
- Leave the `Use workflow from` dropdown as `main`
114
78
- Enter your feature branch in the `branch` input
115
79
- Click the `Run workflow` button
116
-
117
-
### Nightly releases
118
-
119
-
Nightly releases happen automatically at midnight PST via a [cron-driven workflow](./.github/workflows/nightly.yml) that is essentially the same as the experimental releases, but also performs some validations after the release.
120
-
121
-
## Local Development Tips and Tricks
122
-
123
-
### Environment Variables
124
-
125
-
This repository supports handful of environment variables to streamline the local development/testing process.
126
-
127
-
**`REMIX_DEBUG`**
128
-
129
-
By default, the Remix `rollup` build will strip any `console.debug` calls to avoid cluttering up the console during application usage. These `console.debug` statements can be preserved by setting `REMIX_DEBUG=true` during your local build.
130
-
131
-
```sh
132
-
REMIX_DEBUG=true pnpm watch
133
-
```
134
-
135
-
**`LOCAL_BUILD_DIRECTORY`**
136
-
137
-
When developing Remix locally, you often need to go beyond unit/integration tests and test your changes in a local Remix application. The easiest way to do this is to run your local Remix build and use this environment variable to direct `rollup` to write the output files directly into the local Remix application's `node_modules` folder. Then you just need to restart your local Remix application server to pick up the changes.
138
-
139
-
```sh
140
-
# Tab 1 - create and run a local remix application
141
-
npx create-remix
142
-
cd my-remix-app
143
-
npm run dev
144
-
145
-
# Tab 2 - remix repository
146
-
LOCAL_BUILD_DIRECTORY=../my-remix-app pnpm watch
147
-
```
148
-
149
-
Now - any time you make changes in the Remix repository, they will be written out to the appropriate locations in `../my-remix-app/node_modules` and you can restart the `npm run dev` command to pick them up 🎉.
0 commit comments