Skip to content

Commit 4da5cd3

Browse files
author
Rémi Kazeroni
authored
Add merge instructions to release instructions (#3292)
1 parent 197024d commit 4da5cd3

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

doc/sphinx/source/community/release_strategy/release_strategy.rst

+33-3
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,37 @@ and create the new release from the release branch (i.e. not from ``main``).
462462
The release tag always starts with the letter ``v`` followed by the version
463463
number, e.g. ``v2.1.0``.
464464

465-
6. Create and upload the PyPI package
465+
6. Mark the release in the main branch
466+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
467+
468+
When the (pre-)release is tagged, it is time to merge the release branch back into `main`.
469+
We do this for two reasons, namely, one, to mark the point up to which commits in `main`
470+
have been considered for inclusion into the present release, and, two, to inform
471+
setuptools-scm about the version number so that it creates the correct version number in
472+
`main`.
473+
However, unlike in a normal merge, we do not want to integrate any of the changes from the
474+
release branch into main.
475+
This is because all changes that should be in both branches, i.e. bug fixes, originate from
476+
`main` anyway and the only other changes in the release branch relate to the release itself.
477+
To take this into account, we perform the merge in this case on the command line using `the
478+
ours merge strategy <https://git-scm.com/docs/merge-strategies#Documentation/merge-strategies.txt-ours-1>`__
479+
(``git merge -s ours``), not to be confused with the ``ours`` option to the ort merge strategy
480+
(``git merge -X ours``).
481+
For details about merge strategies, see the above-linked page.
482+
To execute the merge use following sequence of steps
483+
484+
.. code-block:: bash
485+
486+
git fetch
487+
git checkout main
488+
git pull
489+
git merge -s ours v2.1.x
490+
git push
491+
492+
Note that the release branch remains intact and you should continue any work on the release
493+
on that branch.
494+
495+
7. Create and upload the PyPI package
466496
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
467497

468498
The package is automatically uploaded to the
@@ -493,7 +523,7 @@ Follow these steps to create a new Python package:
493523
You can read more about this in
494524
`Packaging Python Projects <https://packaging.python.org/tutorials/packaging-projects/>`__.
495525

496-
7. Create the Conda package
526+
8. Create the Conda package
497527
~~~~~~~~~~~~~~~~~~~~~~~~~~~
498528

499529
The ``esmvaltool`` package is published on the `conda-forge conda channel
@@ -514,7 +544,7 @@ they will merge the pull request, which will in turn publish the package on
514544
conda-forge some time later.
515545
Contact the feedstock maintainers if you want to become a maintainer yourself.
516546

517-
8. Check the Docker images
547+
9. Check the Docker images
518548
~~~~~~~~~~~~~~~~~~~~~~~~~~
519549

520550
There are three main Docker container images available for ESMValTool on

0 commit comments

Comments
 (0)