2017-09-08 04:48:34 +08:00
|
|
|
Release Procedure
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Our current policy for releasing is to aim for a bugfix every few weeks and a minor release every 2-3 months. The idea
|
|
|
|
is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence
|
|
|
|
taking a lot of time to make a new one.
|
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-31 08:26:41 +08:00
|
|
|
pytest releases must be prepared on **Linux** because the docs and examples expect
|
2017-05-16 07:23:04 +08:00
|
|
|
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
|
|
|
|
2018-01-30 05:00:08 +08:00
|
|
|
pip3 install -U -r tasks/requirements.txt
|
2017-05-10 09:55:27 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
#. Create a branch ``release-X.Y.Z`` with the version for the release.
|
2015-11-19 00:55:18 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
* **patch releases**: from the latest ``master``;
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
* **minor releases**: from the latest ``features``; then merge with the latest ``master``;
|
|
|
|
|
|
|
|
Ensure your are in a clean work tree.
|
|
|
|
|
|
|
|
#. Generate docs, changelog, announcements and upload a package to
|
2017-05-16 07:23:04 +08:00
|
|
|
your ``devpi`` staging server::
|
2016-08-20 05:50:46 +08:00
|
|
|
|
2017-09-08 04:48:34 +08:00
|
|
|
invoke generate.pre-release <VERSION> <DEVPI USER> --password <DEVPI PASSWORD>
|
2016-08-20 05:50:46 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
If ``--password`` is not given, it is assumed the user is already logged in ``devpi``.
|
|
|
|
If you don't have an account, please ask for one.
|
|
|
|
|
|
|
|
#. Open a PR for this branch targeting ``master``.
|
|
|
|
|
|
|
|
#. Test the package
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
* **Manual method**
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
Run from multiple machines::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
devpi use https://devpi.net/USER/dev
|
|
|
|
devpi test pytest==VERSION
|
2016-08-20 05:50:46 +08:00
|
|
|
|
2017-05-31 08:26: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
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
* **CI servers**
|
2014-09-05 19:13:23 +08:00
|
|
|
|
2017-05-31 08:26:41 +08:00
|
|
|
Configure a repository as per-instructions on
|
|
|
|
devpi-cloud-test_ to test the package on Travis_ and AppVeyor_.
|
|
|
|
All test environments should pass.
|
|
|
|
|
|
|
|
#. Publish to PyPI::
|
2015-07-26 21:20:32 +08:00
|
|
|
|
2017-09-08 04:48:34 +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-08-02 05:24:17 +08:00
|
|
|
#. After a minor/major release, merge ``release-X.Y.Z`` into ``master`` and push (or open a PR).
|
2017-05-31 08:26:41 +08:00
|
|
|
|
|
|
|
.. _devpi-cloud-test: https://github.com/obestwalter/devpi-cloud-test
|
|
|
|
.. _AppVeyor: https://www.appveyor.com/
|
|
|
|
.. _Travis: https://travis-ci.org
|