Skip to content

Commit 6a0e849

Browse files
committed
Update HOWTORELEASE based on the 3.0.0 release
1 parent 875bcd4 commit 6a0e849

File tree

2 files changed

+47
-54
lines changed

2 files changed

+47
-54
lines changed

HOWTORELEASE.rst

+46-53
Original file line numberDiff line numberDiff line change
@@ -3,90 +3,83 @@ How to release pytest
33

44
Note: this assumes you have already registered on pypi.
55

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).
97

10-
1. Bump version numbers in _pytest/__init__.py (setup.py reads it)
8+
2. Check and finalize ``CHANGELOG.rst``.
119

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::
1312

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
1614

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::
1816

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::
2022

2123
devpi use https://devpi.net/USER/dev
2224
devpi upload --formats sdist,bdist_wheel
2325

24-
5. Run from multiple machines::
26+
7. Run from multiple machines::
2527

2628
devpi use https://devpi.net/USER/dev
2729
devpi test pytest==VERSION
2830

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::
3035

3136
devpi list pytest
3237

3338
or look at failures with "devpi list -f pytest".
3439

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::
4341

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
5343

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>`_.
5546

56-
cd doc/en
57-
make install # or "installall" if you have LaTeX installed for PDF
47+
10. Tag the release::
5848

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
6351

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.
6653

67-
68-
ln -s 5.4 latest
54+
11. Send release announcement to mailing lists:
6955

70-
Browse to pytest.org to verify.
56+
57+
58+
7159

72-
11. Publish to pypi::
60+
And announce the release on Twitter, making sure to add the hashtag ``#pytest``.
7361

74-
devpi push pytest==VERSION pypi:NAME
62+
12. **After the release**
7563

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)**:
7865

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.
7970

80-
12. Send release announcement to mailing lists:
71+
b. **minor release (2.9.0)**:
8172

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``.
8582

83+
c. **major release (3.0.0)**: same steps as that of a **minor release**
8684

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``).
9085

91-
14. merge the actual release into the master branch and do a pull request against it
92-
15. merge from master to features

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ basepython = python2.7
4141
deps = flake8
4242
restructuredtext_lint
4343
commands = flake8 pytest.py _pytest testing
44-
rst-lint CHANGELOG.rst
44+
rst-lint CHANGELOG.rst HOWTORELEASE.rst
4545

4646
[testenv:py27-xdist]
4747
deps=pytest-xdist>=1.13

0 commit comments

Comments
 (0)