Skip to content

Commit 2de1a2a

Browse files
author
Klaus Zimmermann
authored
Add merge instructions to release instructions (#2131)
1 parent e7b8954 commit 2de1a2a

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

doc/contributing.rst

+33-3
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,37 @@ and create the new release from the release branch (i.e. not from ``main``).
833833

834834
Create a tag and tick the `This is a pre-release` box if working with a release candidate.
835835

836-
6. Create and upload the PyPI package
836+
6. Mark the release in the main branch
837+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
838+
839+
When the (pre-)release is tagged, it is time to merge the release branch back into `main`.
840+
We do this for two reasons, namely, one, to mark the point up to which commits in `main`
841+
have been considered for inclusion into the present release, and, two, to inform
842+
setuptools-scm about the version number so that it creates the correct version number in
843+
`main`.
844+
However, unlike in a normal merge, we do not want to integrate any of the changes from the
845+
release branch into main.
846+
This is because all changes that should be in both branches, i.e. bug fixes, originate from
847+
`main` anyway and the only other changes in the release branch relate to the release itself.
848+
To take this into account, we perform the merge in this case on the command line using `the
849+
ours merge strategy <https://git-scm.com/docs/merge-strategies#Documentation/merge-strategies.txt-ours-1>`__
850+
(``git merge -s ours``), not to be confused with the ``ours`` option to the ort merge strategy
851+
(``git merge -X ours``).
852+
For details about merge strategies, see the above-linked page.
853+
To execute the merge use following sequence of steps
854+
855+
.. code-block:: bash
856+
857+
git fetch
858+
git checkout main
859+
git pull
860+
git merge -s ours v2.1.x
861+
git push
862+
863+
Note that the release branch remains intact and you should continue any work on the release
864+
on that branch.
865+
866+
7. Create and upload the PyPI package
837867
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
838868

839869
The package is automatically uploaded to the
@@ -864,7 +894,7 @@ Follow these steps to create a new Python package:
864894
You can read more about this in
865895
`Packaging Python Projects <https://packaging.python.org/tutorials/packaging-projects/>`__.
866896

867-
7. Create the Conda package
897+
8. Create the Conda package
868898
~~~~~~~~~~~~~~~~~~~~~~~~~~~
869899

870900
The ``esmvalcore`` package is published on the `conda-forge conda channel
@@ -893,7 +923,7 @@ conda-forge some time later.
893923
Contact the feedstock maintainers if you want to become a maintainer yourself.
894924

895925

896-
8. Check the Docker images
926+
9. Check the Docker images
897927
~~~~~~~~~~~~~~~~~~~~~~~~~~
898928

899929
There are two main Docker container images available for ESMValCore on

0 commit comments

Comments
 (0)