Skip to content

Commit

Permalink
contrib: include branch name in file generated by start-backport
Browse files Browse the repository at this point in the history
When working on backports to different branches, the generated file was
being overwritten as its name consisted of only the current date.
This commit changes the generated file name to also include information
about the branch/release in the file name to prevent this issue.

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
  • Loading branch information
rolinh authored and joestringer committed Mar 20, 2020
1 parent 9f73528 commit c9f0d24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions Documentation/contributing/release/backports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ Creating the backports branch
.. note::

This command will leave behind a file in the current directory with a
name based upon the current date in the form ``YYYY-MM-DD.txt`` which
contains a prepared backport pull-request description so you don't need
to write one yourself.
name based upon the release version and the current date in the form
``vRELEASE-backport-YYYY-MM-DD.txt`` which contains a prepared backport
pull-request description so you don't need to write one yourself.

#. Cherry-pick the commits using the master git SHAs listed, starting
from the oldest (top), working your way down and fixing any merge
Expand Down Expand Up @@ -162,7 +162,8 @@ Via GitHub web interface
backporting to. Note that by default Github creates PRs against the
``master`` branch, so you will need to change it. The title and
description for the pull request should be based upon the
``YYYY-MM-DD.txt`` file that was generated by the scripts above.
``vRELEASE-backport-YYYY-MM-DD.txt`` file that was generated by the scripts
above.

#. Label the new backport PR with the backport label for the stable branch such
as ``backport/X.Y`` as well as ``kind/backports`` so that it is easy to find
Expand All @@ -179,12 +180,12 @@ Via command-line tools

These steps require all of the tools described in the :ref:`backport_setup`
section above. Note that the list of PRs to pass to the ``set-labels.py``
script are listed at the end of the ``YYYY-MM-DD.txt`` file.
script are listed at the end of the ``vRELEASE-backport-YYYY-MM-DD.txt`` file.

.. code-block:: bash
# Create a pull-request on Github
$ gh pull-request -b vX.Y -l backport/vX.Y -F YYYY-MM-DD.txt
$ gh pull-request -b vX.Y -l backport/vX.Y -F vRELEASE-backport-YYYY-MM-DD.txt
# Set PR 1234's v1.0 backporting labels to pending
$ contrib/backporting/set-labels.py 1234 pending 1.0
Expand Down
2 changes: 1 addition & 1 deletion contrib/backporting/start-backport
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ fi

DATE=$(date --rfc-3339=date)
git checkout -b pr/v$BRANCH-backport-$DATE origin/v$BRANCH
contrib/backporting/check-stable $BRANCH $DATE.txt
contrib/backporting/check-stable $BRANCH v$BRANCH-backport-$DATE.txt

0 comments on commit c9f0d24

Please sign in to comment.