summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2022-03-12 10:26:26 +0100
committerGitHub <noreply@github.com>2022-03-12 10:26:26 +0100
commit58e197650c5e233b19677a0b166d8a5f617d81ab (patch)
tree87fae9741d87008783e4a89da509aed7ebee03f9 /doc
parent1622459e37ed5c908dc602bb4c77b8e7191a8bbe (diff)
downloadastroid-git-58e197650c5e233b19677a0b166d8a5f617d81ab.tar.gz
New release process (#1438)
* Document the backporting of bug fixes * Fix processes following discussion * Add normalization in ``tbump`` * Remove numbering so the diff is manageable and the doc easier to update Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/release.md86
1 files changed, 58 insertions, 28 deletions
diff --git a/doc/release.md b/doc/release.md
index 8a885130..3477b4a4 100644
--- a/doc/release.md
+++ b/doc/release.md
@@ -2,46 +2,76 @@
So, you want to release the `X.Y.Z` version of astroid ?
-## Process
+## Releasing a major or minor version
-(Consider triggering the "release tests" workflow in GitHub Actions first.)
+**Before releasing a major or minor version check if there are any unreleased commits on
+the maintenance branch. If so, release a last patch release first. See
+`Releasing a patch version`.**
-1. Check if the dependencies of the package are correct
-2. Check the result (Do `git diff vX.Y.Z-1 ChangeLog` in particular).
-3. Install the release dependencies `pip3 install -r requirements_test.txt`
-4. Bump the version and release by using `tbump X.Y.Z --no-push`.
-5. Push the tag.
-6. Release the version on GitHub with the same name as the tag and copy and paste the
- appropriate changelog in the description. This trigger the pypi release.
+- Remove the empty changelog for the last unreleased patch version `X.Y-1.Z'`. (For
+ example: `v2.3.5`)
+- Check the result of `git diff vX.Y-1.Z' ChangeLog`. (For example:
+ `git diff v2.3.4 ChangeLog`)
+- Install the release dependencies: `pip3 install -r requirements_test.txt`
+- Bump the version and release by using `tbump X.Y.0 --no-push`. (For example:
+ `tbump 2.4.0 --no-push`)
+- Check the result visually and then by triggering the "release tests" workflow in
+ GitHub Actions first.
+- Push the tag.
+- Release the version on GitHub with the same name as the tag and copy and paste the
+ appropriate changelog in the description. This triggers the PyPI release.
+- Move the `main` branch up to a dev version with `tbump`:
-## Post release
-
-### Back to a dev version
+```bash
+tbump X.Y+1.0-dev0 --no-tag --no-push # You can interrupt after the first step
+git commit -am "Upgrade the version to x.y+1.0-dev0 following x.y.0 release"
+```
-Move back to a dev version with `tbump`:
+For example:
```bash
-tbump X.Y.Z+1-dev0 --no-tag --no-push # You can interrupt after the first step
-git commit -am "Upgrade the version to x.y.z+1-dev0 following x.y.z release"
+tbump 2.5.0-dev0 --no-tag --no-push
+git commit -am "Upgrade the version to 2.5.0-dev0 following 2.4.0 release"
```
Check the result and then upgrade the main branch
-### Milestone handling
+- Delete the `maintenance/X.Y-1.x` branch. (For example: `maintenance/2.3.x`)
+- Create a `maintenance/X.Y.x` (For example: `maintenance/2.4.x` from the `v2.4.0` tag.)
-We move issue that were not done in the next milestone and block release only if it's an
-issue labelled as blocker.
+## Backporting a fix from `main` to the maintenance branch
-## Post release
+Whenever a commit on `main` should be released in a patch release on the current
+maintenance branch we cherry-pick the commit from `main`.
-### Merge tags in main for pre-commit
+- During the merge request on `main`, make sure that the changelog is for the patch
+ version `X.Y-1.Z'`. (For example: `v2.3.5`)
+- After the PR is merged on `main` cherry-pick the commits on the `maintenance/X.Y.x`
+ branch (For example: from `maintenance/2.4.x` cherry-pick a commit from `main`)
+- Release a patch version
-If the tag you just made is not part of the main branch, merge the tag `vX.Y.Z` in the
-main branch by doing a history only merge. It's done in order to signal that this is an
-official release tag, and for `pre-commit autoupdate` to works.
+## Releasing a patch version
-```bash
-git checkout main
-git merge --no-edit --strategy=ours vX.Y.Z
-git push
-```
+We release patch versions when a crash or a bug is fixed on the main branch and has been
+cherry-picked on the maintenance branch.
+
+- Check the result of `git diff vX.Y-1.Z-1 ChangeLog`. (For example:
+ `git diff v2.3.4 ChangeLog`)
+- Install the release dependencies: `pip3 install -r requirements_test.txt`
+- Bump the version and release by using `tbump X.Y-1.Z --no-push`. (For example:
+ `tbump 2.3.5 --no-push`)
+- Check the result visually and then by triggering the "release tests" workflow in
+ GitHub Actions first.
+- Push the tag.
+- Release the version on GitHub with the same name as the tag and copy and paste the
+ appropriate changelog in the description. This triggers the PyPI release.
+- Merge the `maintenance/X.Y.x` branch on the main branch. The main branch should have
+ the changelog for `X.Y-1.Z+1` (For example `v2.3.6`). This merge is required so
+ `pre-commit autoupdate` works for pylint.
+- Fix version conflicts properly, or bump the version to `X.Y.0-devZ` (For example:
+ `2.4.0-dev6`) before pushing on the main branch
+
+## Milestone handling
+
+We move issues that were not done to the next milestone and block releases only if there
+are any open issues labelled as `blocker`.