2015-07-26 21:20:32 +08:00
|
|
|
How to release pytest
|
2014-09-05 19:13:23 +08:00
|
|
|
--------------------------------------------
|
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
.. important::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
pytest releases must be prepared on **linux** because the docs and examples expect
|
|
|
|
to be executed in that platform.
|
2016-02-14 03:29:30 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
#. Install development dependencies in a virtual environment with::
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
pip3 install -r tasks/requirements.txt
|
2017-05-10 09:55:27 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
#. Create a branch ``release-X.Y.Z`` with the version for the release. Make sure it is up to date
|
|
|
|
with the latest ``master`` (for patch releases) and with the latest ``features`` merged with
|
|
|
|
the latest ``master`` (for minor releases). Ensure your are in a clean work tree.
|
2015-11-19 00:55:18 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
#. Check and finalize ``CHANGELOG.rst`` (will be automated soon).
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
#. Execute to automatically generate docs, announcements and upload a package to
|
|
|
|
your ``devpi`` staging server::
|
2016-08-20 05:50:46 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
invoke generate.pre_release <VERSION> <DEVPI USER> --password <DEVPI PASSWORD>
|
2016-08-20 05:50:46 +08:00
|
|
|
|
2017-05-16 07:23:04 +08:00
|
|
|
If ``--password`` is not given, it is assumed the user is already logged in. If you don't have
|
|
|
|
an account, please ask for one!
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2016-08-29 21:53:41 +08:00
|
|
|
#. Run from multiple machines::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
devpi use https://devpi.net/USER/dev
|
|
|
|
devpi test pytest==VERSION
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2016-08-20 05:50:46 +08:00
|
|
|
Alternatively, you can use `devpi-cloud-tester <https://github.com/nicoddemus/devpi-cloud-tester>`_ to test
|
|
|
|
the package on AppVeyor and Travis (follow instructions on the ``README``).
|
|
|
|
|
2016-08-29 21:53:41 +08:00
|
|
|
#. Check that tests pass for relevant combinations with::
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2015-09-26 10:10:35 +08:00
|
|
|
devpi list pytest
|
2014-09-05 19:13:23 +08:00
|
|
|
|
|
|
|
or look at failures with "devpi list -f pytest".
|
|
|
|
|
2017-05-23 06:06:53 +08:00
|
|
|
#. Feeling confident? Publish to PyPI::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-05-23 06:06:53 +08:00
|
|
|
invoke generate.publish_release <VERSION> <DEVPI USER> <PYPI_NAME>
|
2015-05-19 16:32:21 +08:00
|
|
|
|
2017-05-23 06:06:53 +08:00
|
|
|
where PYPI_NAME is the name of pypi.python.org as configured in your ``~/.pypirc``
|
2016-08-20 05:50:46 +08:00
|
|
|
file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_.
|
2015-07-26 21:20:32 +08:00
|
|
|
|
|
|
|
|
2017-05-23 06:06:53 +08:00
|
|
|
#. After a minor/major release, merge ``features`` into ``master`` and push (or open a PR).
|