|
1 | 1 | 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. |
2 | 6 |
|
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 | +=========================================== |
14 | 9 |
|
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>`_ |
17 | 13 |
|
18 | | -1. Update CHANGES.rst |
| 14 | +2. Update CHANGES.rst |
19 | 15 | ===================== |
20 | 16 |
|
21 | 17 | 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 |
23 | 19 | described in a separate section. |
24 | 20 | It's best to compare against the git log. |
25 | 21 |
|
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. |
28 | 25 |
|
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``. |
30 | 29 |
|
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 |
42 | 31 | =============== |
43 | 32 |
|
44 | | -Run the following command: |
45 | | - |
46 | | -:: |
| 33 | +Wait for the CI to succeed on the commit you are about to tag. |
47 | 34 |
|
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``. |
50 | 40 |
|
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 |
77 | 42 |
|
78 | | - pip install ".[dev]" |
79 | | - pytest tests |
| 43 | + git tag -s $VERSION |
80 | 44 |
|
81 | | -7. Upload to pypi |
82 | | -================= |
| 45 | +If you're happy with it, push it: |
83 | 46 |
|
84 | | -Upload the tested dist file to pypi. |
| 47 | +.. code-block:: bash |
85 | 48 |
|
86 | | -:: |
| 49 | + git push upstream $VERSION |
87 | 50 |
|
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. |
89 | 53 |
|
90 | | -8. Upload the signed tag |
91 | | -======================== |
| 54 | +4. Draft a release |
| 55 | +================== |
92 | 56 |
|
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 |
94 | 60 |
|
95 | | -:: |
| 61 | +5. Create new stable branch |
| 62 | +=========================== |
96 | 63 |
|
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