Skip to content

Commit b175b10

Browse files
committed
chore: add guidance for how to release new versions of catalyst-makeswift with Changesets
1 parent 20b8788 commit b175b10

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,49 +20,66 @@ To contribute to the `integrations/makeswift` branch, you can create a new branc
2020

2121
### Pulling updates from `canary` into `integrations/makeswift`
2222

23-
We aim to keep `integrations/makeswift` in sync with `canary`. To do this, we frequently pull the latest code from `canary` into `integrations/makeswift`.
23+
We aim to keep `integrations/makeswift` in sync with `canary`. To do this, we pull the latest code from `canary` into `integrations/makeswift` right after we cut a new release for `canary`.
2424

2525
To pull the latest code from `canary` into `integrations/makeswift`, you can follow these steps:
2626

27-
1. Fetch the latest code from `canary`:
27+
1. Check [open Pull Requests](https://github.com/bigcommerce/catalyst/pulls?q=is%3Apr+is%3Aopen) for any PR's titled `Version Packages (main)` ([example](https://github.com/bigcommerce/catalyst/pull/1892))
28+
a. If you find one, it should be approved and merged before continuing
29+
b. If you do not find one, it most likely indicates that `canary` and `integrations/makeswift` are already in sync, and there are no updates to pull into `integrations/makeswift` from `canary`.
30+
31+
> [!TIP]
32+
> The remaining steps assume you are working locally after having cloned `bigcommerce/catalyst`, and that you have rights to push to the `integrations/makeswift` branch on GitHub.
33+
34+
2. Fetch the latest code from `canary`:
2835

2936
```bash
3037
git checkout canary
3138
git pull
3239
```
3340

34-
2. Fetch the latest code from `integrations/makeswift`:
41+
3. Fetch the latest code from `integrations/makeswift`:
3542

3643
```bash
3744
git checkout integrations/makeswift
3845
git pull
3946
```
4047

41-
3. Checkout a new branch from `integrations/makeswift`:
48+
4. Checkout a new branch from `integrations/makeswift`:
4249

4350
```bash
4451
git checkout -b {new-branch-name}
4552
```
4653

47-
4. Merge `canary` into the new branch:
54+
5. Merge `canary` into the new branch:
4855

4956
```bash
5057
git merge canary
5158
```
5259

53-
5. After resolving any merge conflicts, open a new PR in GitHub to merge your new branch into `integrations/makeswift`. This PR should be code reviewed and approved before the next steps.
60+
6. Resolve merge conflicts, if necessary.
61+
62+
> [!WARNING]
63+
> Ensure that the merge does not inadvertently overwrite the `integrations/makeswift` version of `core/CHANGELOG.md`, or the `name` and `version` fields in `core/package.json`. The `name` field should remain `@bigcommerce/catalyst-makeswift`, the `version` field should remain whatever the latest published `@bigcommerce/catalyst-makeswift` version was, and the `core/CHANGELOG.md` should not include any changelog entries from the `canary` version of `core/CHANGELOG.md`
64+
65+
7. Create a new `.changeset/*.md` file on `integrations/makeswift` by running `pnpm changeset`. The version bump you choose (e.g., `major`, `minor`, or `patch`) should match the version bumped by the original `Version Packages (main)` PR from Step 1 above. For the Changeset description, simply link to the `core/CHANGELOG.md` entry on `canary` that was created by the `Version Packages (main)` PR from Step 1 above. Create another commit containing the Changeset file.
66+
67+
8. Open a new PR in GitHub to merge your new branch into `integrations/makeswift`. This PR should be code reviewed and approved before the next steps.
5468

55-
6. Rebase the changes onto the local `integrations/makeswift` branch in order to make the branches 1-1 and keep a linear commit history.
69+
9. Rebase the changes onto the local `integrations/makeswift` branch in order to make the branches 1-1 and keep a linear commit history.
5670

5771
```bash
5872
git checkout integrations/makeswift
5973
git rebase {new-branch-name}
6074
```
6175

62-
7. Push the changes up to GitHub, which will automatically close the open PR from step 6.
63-
```bash
64-
git push
65-
```
76+
10. Push the changes up to GitHub, which will automatically close the open PR from step 6.
77+
78+
```bash
79+
git push
80+
```
81+
82+
11. This should create or update a PR titled `Version Packages (integrations/makeswift)`. Approving and merging this PR will create a new GitHub release for `@bigcommerce/catalyst-makeswift` based on the version bump you chose in Step 7 above.
6683

6784
## Other Ways to Contribute
6885

0 commit comments

Comments
 (0)