Skip to content

Commit 5a212eb

Browse files
doc/RELEASE: update release instructions
Signed-off-by: Bastian Krause <[email protected]>
1 parent 1ab0abd commit 5a212eb

File tree

1 file changed

+40
-72
lines changed

1 file changed

+40
-72
lines changed

doc/RELEASE.rst

Lines changed: 40 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,65 @@
11
Step by step guide to releasing a new labgrid version.
2+
labgrid follows the `calver <https://calver.org>`_ versioning scheme
3+
``YY.MINOR[.MICRO]``.
4+
The ``MINOR`` number starts at 0.
5+
The ``MICRO`` number for stable releases starts at 1.
26

3-
0. Preparations
4-
===============
5-
Clean the `dist/` directory:
6-
7-
.. code-block:: bash
8-
9-
rm dist/*
10-
11-
Check your commit mail and name:
12-
13-
.. code-block:: bash
7+
1. Check for relevant PRs that need a merge
8+
===========================================
149

15-
git config --get user.name
16-
git config --get user.email
10+
- `Milestones <https://github.com/labgrid-project/labgrid/milestones>`_
11+
- `Fixes <https://github.com/labgrid-project/labgrid/pulls?q=label%3Afix>`_
12+
- `Fixes for stable <https://github.com/labgrid-project/labgrid/issues?q=label%3A%22fix+for+stable%22>`_
1713

18-
1. Update CHANGES.rst
14+
2. Update CHANGES.rst
1915
=====================
2016

2117
Update the `CHANGES.rst` file.
22-
Ensure that no incompatiblities are unlisted and that all major features are
18+
Ensure that no incompatibilities are unlisted and that all major features are
2319
described in a separate section.
2420
It's best to compare against the git log.
2521

26-
2. Bump Version Number
27-
======================
22+
Add new sections including the version number for the release in `CHANGES.rst`
23+
(if not already done).
24+
Set the release date.
2825

29-
Bump the version number in `CHANGES.rst`.
26+
If you are bumping the ``MINOR`` number, import the changes from the latest stable
27+
branch and add a new (unreleased) section for the next release.
28+
Also add a new section into ``debian/changelog``.
3029

31-
3. Create a signed Tag
32-
======================
33-
34-
Create a signed tag of the new release.
35-
Your PGP-key has to be available on the computer.
36-
37-
.. code-block:: bash
38-
39-
git tag -s <your-version-number>
40-
41-
4. Create sdist
30+
3. Create a tag
4231
===============
4332

44-
Run the following command:
45-
46-
::
33+
Wait for the CI to succeed on the commit you are about to tag.
4734

48-
pip install build
49-
python -m build --sdist
35+
Now create a (signed) tag of the new release.
36+
If it should be signed (``-s``), your PGP-key has to be available on the
37+
computer.
38+
The release tag should start with a lower case ``v``, e.g. ``v24.0`` or
39+
``v24.0.1``.
5040

51-
The sdist file will be available in the `dist/` directory.
52-
53-
5. Test upload to pypi dev
54-
==========================
55-
56-
Test the upload by using twine to upload to pypi test service
57-
58-
::
59-
60-
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
61-
62-
6. Test download from pypi dev
63-
==============================
64-
65-
Test the upload by using pypi dev as a download source
66-
67-
::
68-
69-
virtualenv -p python3 labgrid-release-<your-version-number>
70-
source labgrid-release-<your-version-number>/bin/activate
71-
pip install --upgrade pip setuptools wheel
72-
pip install --index-url https://test.pypi.org/simple/ labgrid
73-
74-
And optionally run the tests:
75-
76-
::
41+
.. code-block:: bash
7742
78-
pip install ".[dev]"
79-
pytest tests
43+
git tag -s $VERSION
8044
81-
7. Upload to pypi
82-
=================
45+
If you're happy with it, push it:
8346

84-
Upload the tested dist file to pypi.
47+
.. code-block:: bash
8548
86-
::
49+
git push upstream $VERSION
8750
88-
twine upload dist/*
51+
The CI should take care of the rest.
52+
Make sure it succeeds and the new release is available on PyPi.
8953

90-
8. Upload the signed tag
91-
========================
54+
4. Draft a release
55+
==================
9256

93-
Upload the signed tag to the upstream repository
57+
On GitHub, draft a new release, add the changes in Markdown format and create a
58+
discussion for the release:
59+
https://github.com/labgrid-project/labgrid/releases/new
9460

95-
::
61+
5. Create new stable branch
62+
===========================
9663

97-
git push upstream <your-version-number>
64+
If you are bumping the ``MINOR`` number, push a new stable branch
65+
``stable-YY.MINOR`` based on the release tag.

0 commit comments

Comments
 (0)