Skip to content

Commit 99e5a74

Browse files
committed
Update DEVELOPMENT.md
1 parent 5115991 commit 99e5a74

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

DEVELOPMENT.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,34 @@
22

33
## Releases
44

5-
New releases should be created from release branches originating from the `dev` branch. When you are ready to begin the release process:
5+
New 7.x releases should be created from release branches originating from the `dev` branch. If you are doing a 6.x release, please see the [v6 section](#v6-releases) below.
6+
7+
When you are ready to begin the release process:
68

79
- Make sure you've pulled all the changes from GitHub for both `dev` and `main` branches
10+
- `git checkout main && git pull origin main`
11+
- `git checkout dev && git pull origin dev`
812
- Check out the `dev` branch
9-
- Create a new `release-next` branch (eg, `git checkout -b release-next`)
13+
- `git checkout dev`
14+
- Create a new `release-next` branch
15+
- `git checkout -b release-next`
1016
- Technically, any `release-*` branch name will work as this is what triggers our GitHub CI workflow that will ultimately publish the release - but we just always use `release-next`
11-
- We are using `release-v6` for [ongoing v6 releases](#6x-releases-from-the-v6-branch)
12-
- Merge `main` into the release branch
17+
- We are using `release-v6` for [ongoing v6 releases](#v6-releases)
18+
- Merge `main` into the `release-next` branch
19+
- `git merge --no-ff main`
1320

1421
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.
1522

1623
### Starting a new pre-release
1724

1825
- Ensure you are on the new `release-next` branch
26+
- `git checkout release-next`
1927
- Enter Changesets pre-release mode using the `pre` tag:
2028
- `pnpm changeset pre enter pre`
2129
- Commit the change and push the `release-next` branch to GitHub
2230
- `git commit -a -m "Enter prerelease mode"`
2331
- `git push --set-upstream origin release-next`
24-
- Wait for the release workflow to finish - the Changesets action will open a PR that will increment all versions and generate the changelogs
32+
- Wait for the changesets CI workflow to finish which will open a PR pointed to `release-next` that will increment all versions and generate the changelogs
2533
- If you need/want to make any changes to the `CHANGELOG.md` files, you can do so and commit directly to the PR branch
2634
- This is usually not required for prereleases
2735
- Once the changesets files are in good shape, merge the PR to `release-next`
@@ -30,7 +38,7 @@ Changesets will do most of the heavy lifting for our releases. When changes are
3038
### Prepare the draft release notes
3139

3240
- At this point, you can begin crafting the release notes for the eventual stable release in the root `CHANGELOG.md` file in the repo
33-
- Copy the template for a new release and update the version numbers and links accordingly
41+
- Copy the commented out template for a new release and update the version numbers and links accordingly
3442
- Copy the relevant changelog entries from all packages into the release notes and adjust accordingly
3543
- `find packages -name 'CHANGELOG.md' -mindepth 2 -maxdepth 2 -exec code {} \;`
3644
- Commit these changes directly to the `release-next` branch - they will not trigger a new prerelease since they do not include a changeset
@@ -82,23 +90,25 @@ You may need to make changes to a pre-release prior to publishing a final stable
8290

8391
Hotfix releases follow the same process as standard releases above, but the `release-next` branch should be branched off latest `main` instead of `dev`. Once the stable hotfix is published, the `release-next` branch should be merged back into both `main` and `dev` just like a normal release.
8492

85-
### 6.x releases from the `v6` branch
93+
### v6 releases
8694

87-
After the `6.25.0` release, we branched off a `v6` branch for continued `6.x` work and merged the `v7` branch into `dev` to begin preparation for the `7.0.0` release. Until we launch `7.0.0`, we need to `6.x` releases in a slightly different manner.
95+
6.x releases are managed in a similar process to the above but from the `v6` branch, and they do not automatically merge changes back to `dev`/`main`.
8896

8997
- Changes for 6.x should be PR'd to the `v6` branch with a changeset
90-
- Once merged, cherry-pick or re-do those changes against the `dev` branch so that they show up in v7
91-
- This does not apply to things like adding deprecation warnings that should not land in v7
92-
- You should not include a changeset in your commit to `dev`
93-
- Starting the release process for 6.x is the same as outlined above, with a few changes:
98+
- If these changes should also be applied to v7, cherry-pick or re-do those changes against the `dev` branch (including the changeset). These changes will make it to `main` with the next v7 release.
99+
- Starting the release process for 6.x is the same as outlined above, with a few exceptioins:
94100
- Branch from `v6` instead of `dev`
95-
- Use the name `release-v6` to avoid collisions with the ongoing v7 (pre)releases using `release-next`
96-
- **Do not** merge `main` into the `release-v6` branch
97-
- The process of the PRs and iterating on prereleases remains the same
101+
- Use `release-v6` instead of `release-next`
102+
- Do **not** merge `main` into `release-v6`
103+
- Steps:
104+
- `git checkout v6 && git pull origin v6`
105+
- `git checkout -b release-v6`
106+
- `pnpm changeset pre enter pre`
107+
- The process of the PRs and iterating on prereleases remains the same
98108
- Once the stable release is out:
99109
- Merge `release-v6` back to `v6` with a **Normal Merge**
100110
- **Do not** merge `release-v6` to `main`
101-
- Copy the updated root `CHANGELOG.md` entry for the `6.X.Y` release to `main` and `dev`
111+
- Copy the updated root `CHANGELOG.md` entries for the `6.X.Y` release to `main` and `dev`
102112
- `git checkout main`
103113
- `git diff [email protected]@6.X.Y -- "***CHANGELOG.md" > ./docs.patch`
104114
- `git apply ./docs.patch`
@@ -112,19 +122,7 @@ After the `6.25.0` release, we branched off a `v6` branch for continued `6.x` wo
112122
- `rm ./docs.patch`
113123
- The _code_ changes should already be in the `dev` branch
114124
- This should have happened at the time the v6 change was made (except for changes such as deprecation warnings)
115-
- Confirm that the commits in this release are all included in `dev` already:
116-
- I.e., https://github.com/remix-run/react-router/compare/[email protected]@6.26.2
117-
- If one or more are not, then you can manually bring them over by cherry-picking the commit (or re-doing the work)
118-
- You should not include a changelog in your commit to `dev`
119-
- Copy the updated changelogs from `release-next` over to `dev` so the changelogs continue to reflect this new 6x release into the v7 releases
120-
121-
### Notes on 7.0.0-pre.N released during the v7 prerelease
122-
123-
During the v7 prerelease, the process for iterating and shipping a new `7.0.0-pre.N` release is slightly more streamlined than the steps outlined [above](#iterating-a-pre-release). Because we want _everything_ in `dev` to ship in the prerelease, cutting a new prerelease is simply:
124-
125-
- Merge `dev` -> `release-next`
126-
- This will include the changesets for changes committed to `dev` since the last prerelease
127-
- This will automatically open a new Changesets PR for the new prerelease version
125+
- Confirm that the commits in this release are all included in `dev` already, and if not you can manually bring them over by cherry-picking the commit or re-doing the work
128126

129127
### Experimental releases
130128

0 commit comments

Comments
 (0)