From 163b4d2d33a0c6dda8cb78b355ddc16556aad15f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 12 Jan 2022 13:30:43 +0100 Subject: [PATCH] docs/publishing.md: review fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- docs/publishing.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/publishing.md b/docs/publishing.md index 1189aa7e47..e5642a3467 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -23,7 +23,7 @@ example and assume that it is currently version `1.5.0` in the master branch. In the event of a severe bug being introduced in version `1.5.0` of the `@backstage/plugin-foo` released in the `2048-01-01` release, the following -processed is used to release an emergency fix as `1.5.1`: +process is used to release an emergency fix as `1.5.1`: - [ ] Identify the release that needs to be patched, in this case we're fixing a broken release, so it would be the most recent one, `2048-01-01`. In the @@ -31,7 +31,8 @@ processed is used to release an emergency fix as `1.5.1`: published version of each major version of the package should be the one patched. - [ ] Make sure a patch branch exists for the release that is being patched. If - a patch already exists, reuse the existing branch. + a patch already exists, reuse the existing branch. The branch **must + always** be named exactly `release--patch`. ```bash git checkout release-2048-01-01 @@ -40,23 +41,27 @@ processed is used to release an emergency fix as `1.5.1`: ``` - [ ] With the `release-2048-01-01-patch` branch as a base, create a new branch - for your fix: + for your fix. This branch can be named anything, but the following naming + pattern may be suitable: ```bash git checkout -b ${USER}/release-2048-01-01-emergency-fix ``` -- [ ] Apply fixes and create a new patch changeset for the effected package, +- [ ] Apply fixes and create a new patch changeset for the affected package, then commit these changes. - [ ] Run `yarn release` in the root of the repo in order to convert your changeset into package version bumps and changelog entries. Commit these changes as a second `"Generated release"` commit. -- [ ] Create PR towards the base branch(`release-2048-01-01-patch`) containing +- [ ] Create PR towards the base branch (`release-2048-01-01-patch`) containing the two commits. -- [ ] Review/Merge PR into `release-2048-01-01-patch`. This will automatically - trigger a release. -- [ ] In the master branch, add a `.changeset/patched.json` to make sure that - future releases of the packages are bumped accordingly: +- [ ] Review/Merge the PR into `release-2048-01-01-patch`. This will + automatically trigger a release. +- [ ] Make sure the same fix is applied in master before the next release, and + create an appropriate changeset for that as well. In the changeset towards + master you should refer back to all patch releases that also received the + same fix. Also be sure to update `.changeset/patched.json` in the same PR + to make sure that future releases of the packages are bumped accordingly: ```json { @@ -65,7 +70,3 @@ processed is used to release an emergency fix as `1.5.1`: } } ``` - -- [ ] Apply the same fix towards master if needed and create appropriate - changeset. In the changeset towards master you should refer back to all - patch releases that also received the same fix.