@@ -3,90 +3,83 @@ How to release pytest
3
3
4
4
Note: this assumes you have already registered on pypi.
5
5
6
- 0. create the branch release-VERSION
7
- use features as base for minor/major releases
8
- and master as base for bugfix releases
6
+ 1. Bump version numbers in ``_pytest/__init__.py `` (``setup.py `` reads it).
9
7
10
- 1. Bump version numbers in _pytest/__init__.py (setup.py reads it)
8
+ 2. Check and finalize `` CHANGELOG.rst ``.
11
9
12
- 2. Check and finalize CHANGELOG
10
+ 3. Write ``doc/en/announce/release-VERSION.txt `` and include
11
+ it in ``doc/en/announce/index.txt ``. Run this command to list names of authors involved::
13
12
14
- 3. Write doc/en/announce/release-VERSION.txt and include
15
- it in doc/en/announce/index.txt::
13
+ git log $(git describe --abbrev=0 --tags)..HEAD --format='%aN' | sort -u
16
14
17
- git log 2.8.2..HEAD --format='%aN' | sort -u # lists the names of authors involved
15
+ 4. Regenerate the docs examples using tox::
18
16
19
- 4. Use devpi for uploading a release tarball to a staging area::
17
+ tox -e regen
18
+
19
+ 5. At this point, open a PR named ``release-X `` so others can help find regressions or provide suggestions.
20
+
21
+ 6. Use devpi for uploading a release tarball to a staging area::
20
22
21
23
devpi use https://devpi.net/USER/dev
22
24
devpi upload --formats sdist,bdist_wheel
23
25
24
- 5 . Run from multiple machines::
26
+ 7 . Run from multiple machines::
25
27
26
28
devpi use https://devpi.net/USER/dev
27
29
devpi test pytest==VERSION
28
30
29
- 6. Check that tests pass for relevant combinations with::
31
+ Alternatively, you can use `devpi-cloud-tester <https://github.com/nicoddemus/devpi-cloud-tester>`_ to test
32
+ the package on AppVeyor and Travis (follow instructions on the ``README``).
33
+
34
+ 8. Check that tests pass for relevant combinations with::
30
35
31
36
devpi list pytest
32
37
33
38
or look at failures with "devpi list -f pytest".
34
39
35
- 7. Regenerate the docs examples using tox, and check for regressions::
36
-
37
- tox -e regen
38
- git diff
39
-
40
-
41
- 8. Build the docs, you need a virtualenv with py and sphinx
42
- installed::
40
+ 9. Feeling confident? Publish to pypi::
43
41
44
- cd doc/en
45
- make html
46
-
47
- Commit any changes before tagging the release.
48
-
49
- 9. Tag the release::
50
-
51
- git tag VERSION
52
- git push
42
+ devpi push pytest==VERSION pypi:NAME
53
43
54
- 10. Upload the docs using doc/en/Makefile::
44
+ where NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
45
+ file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
55
46
56
- cd doc/en
57
- make install # or "installall" if you have LaTeX installed for PDF
47
+ 10. Tag the release::
58
48
59
- This requires ssh-login permission on pytest.org because it uses
60
- rsync.
61
- Note that the ``install`` target of ``doc/en/Makefile`` defines where the
62
- rsync goes to, typically to the "latest" section of pytest.org.
49
+ git tag VERSION <hash>
50
+ git push origin VERSION
63
51
64
- If you are making a minor release (e.g. 5.4), you also need to manually
65
- create a symlink for "latest"::
52
+ Make sure ``<hash>`` is **exactly** the git hash at the time the package was created.
66
53
67
-
68
- ln -s 5.4 latest
54
+ 11. Send release announcement to mailing lists:
69
55
70
- Browse to pytest.org to verify.
56
+
57
+
58
+
71
59
72
- 11. Publish to pypi::
60
+ And announce the release on Twitter, making sure to add the hashtag `` #pytest ``.
73
61
74
- devpi push pytest==VERSION pypi:NAME
62
+ 12. ** After the release **
75
63
76
- where NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
77
- file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
64
+ a. **patch release (2.8.3) **:
78
65
66
+ 1. Checkout ``master ``.
67
+ 2. Update version number in ``_pytest/__init__.py `` to ``"2.8.4.dev" ``.
68
+ 3. Create a new section in ``CHANGELOG.rst `` titled ``2.8.4.dev `` and add a few bullet points as placeholders for new entries.
69
+ 4. Commit and push.
79
70
80
- 12. Send release announcement to mailing lists :
71
+ b. ** minor release (2.9.0) ** :
81
72
82
- - pytest-dev
83
- - testing-in-python
84
-
73
+ 1. Merge ``features `` into ``master ``.
74
+ 2. Checkout ``master ``.
75
+ 3. Follow the same steps for a **patch release ** above, using the next patch release: ``2.9.1.dev ``.
76
+ 4. Commit ``master ``.
77
+ 5. Checkout ``features `` and merge with ``master `` (should be a fast-forward at this point).
78
+ 6. Update version number in ``_pytest/__init__.py `` to the next minor release: ``"2.10.0.dev" ``.
79
+ 7. Create a new section in ``CHANGELOG.rst `` titled ``2.10.0.dev ``, above ``2.9.1.dev ``, and add a few bullet points as placeholders for new entries.
80
+ 8. Commit ``features ``.
81
+ 9. Push ``master `` and ``features ``.
85
82
83
+ c. **major release (3.0.0) **: same steps as that of a **minor release **
86
84
87
- 13. **after the release ** Bump the version number in ``_pytest/__init__.py ``,
88
- to the next Minor release version (i.e. if you released ``pytest-2.8.0 ``,
89
- set it to ``pytest-2.9.0.dev1 ``).
90
85
91
- 14. merge the actual release into the master branch and do a pull request against it
92
- 15. merge from master to features
0 commit comments