@@ -10,42 +10,38 @@ taking a lot of time to make a new one.
10
10
pytest releases must be prepared on **Linux ** because the docs and examples expect
11
11
to be executed on that platform.
12
12
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:
14
14
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.
16
17
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 ``).
19
20
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.
23
22
24
23
#. Using ``tox ``, generate docs, changelog, announcements::
25
24
26
- $ tox -e release -- <VERSION>
25
+ $ tox -e release -- MAJOR.MINOR.PATCH
27
26
28
27
This will generate a commit with all the changes ready for pushing.
29
28
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 ``.
33
30
34
31
#. After all tests pass and the PR has been approved, publish to PyPI by pushing the tag::
35
32
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
38
35
39
36
Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
40
37
41
38
#. Merge the PR.
42
39
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::
45
41
46
42
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
49
45
git checkout origin/master -- changelog
50
46
git commit # no arguments
51
47
0 commit comments