@@ -10,42 +10,38 @@ taking a lot of time to make a new one.
1010 pytest releases must be prepared on **Linux ** because the docs and examples expect
1111 to be executed on that platform.
1212
13- #. Create a branch ``release-X.Y.Z `` with the version for the release.
13+ The release a version ``MAJOR.MINOR.PATCH ``, follow these steps::
1414
15- * **maintenance releases **: from ``4.6-maintenance ``;
15+ #. For major and minor releases, create a new branch ``MAJOR.MINOR.x `` from the
16+ latest ``master `` and push it to the ``pytest-dev/pytest `` repo.
1617
17- * ** patch releases **: from the latest ``MAJOR.MINOR.x `` branch. If one doesn't exist,
18- create it from the latest tag for the MAJOR.MINOR series;
18+ #. Create a branch `` release-MAJOR.MINOR.PATCH `` from the ``MAJOR.MINOR.x `` branch.
19+ (Note: historically, the `` 4.6.x `` branch is called `` 4.6-maintenance ``).
1920
20- * **minor releases **: from the latest ``master ``;
21-
22- Ensure your are in a clean work tree.
21+ Ensure your are updated and in a clean working tree.
2322
2423#. Using ``tox ``, generate docs, changelog, announcements::
2524
26- $ tox -e release -- <VERSION>
25+ $ tox -e release -- MAJOR.MINOR.PATCH
2726
2827 This will generate a commit with all the changes ready for pushing.
2928
30- #. Open a PR for this branch targeting ``master `` for minor releases,
31- the appropriate ``MAJOR.MINOR.x `` for patch releases, or ``4.6-maintenance ``
32- for maintenance releases.
29+ #. Open a PR for the ``release-MAJOR.MINOR.PATCH `` branch targeting ``MAJOR.MINOR.x ``.
3330
3431#. After all tests pass and the PR has been approved, publish to PyPI by pushing the tag::
3532
36- git tag <VERSION>
37- git push [email protected] :pytest-dev/pytest.git <VERSION> 33+ git tag MAJOR.MINOR.PATCH
34+ git push [email protected] :pytest-dev/pytest.git MAJOR.MINOR.PATCH 3835
3936 Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
4037
4138#. Merge the PR.
4239
43- #. If this is a maintenance release, cherry-pick the CHANGELOG / announce
44- files to the ``master `` branch::
40+ #. Cherry-pick the CHANGELOG / announce files to the ``master `` branch::
4541
4642 git fetch --all --prune
47- git checkout origin/master -b cherry-pick-maintenance- release
48- git cherry-pick --no-commit -m1 origin/4.6-maintenance
43+ git checkout origin/master -b cherry-pick-release
44+ git cherry-pick --no-commit -m1 origin/MAJOR.MINOR.x
4945 git checkout origin/master -- changelog
5046 git commit # no arguments
5147
0 commit comments