|
| 1 | +Maintainer notes |
| 2 | +**************** |
| 3 | + |
| 4 | +.. contents:: Table of contents: |
| 5 | + :local: |
| 6 | + :depth: 1 |
| 7 | + |
| 8 | +Merging pull request |
| 9 | +==================== |
| 10 | + |
| 11 | +Pull requests should be merged using `pr.py <https://github.com/roc-streaming/roc-toolkit/blob/develop/scripts/pr.py>`_ script, which does the following: |
| 12 | + |
| 13 | +- Rebases PR on up-to-date develop branch. |
| 14 | +- If requested, squashes all commits into one. |
| 15 | +- Overwrites commit messages to add a link to related issue to each commit (e.g. "Implement feature" becomes "gh-123 Implement feature"). The issue number should be present is PR description or passed as command-line flag. |
| 16 | +- Force-pushes updated commits to PR's branch. |
| 17 | +- Asks GitHub to merge PR. |
| 18 | + |
| 19 | +You should choose whether to merge by rebasing or squashing. |
| 20 | + |
| 21 | +Merge PR by rebasing: |
| 22 | + |
| 23 | +.. code:: |
| 24 | +
|
| 25 | + scripts/pr.py merge --rebase 123 |
| 26 | +
|
| 27 | +Merge PR by rebasing and squashing all commits into one: |
| 28 | + |
| 29 | +.. code:: |
| 30 | +
|
| 31 | + scripts/pr.py merge --squash 123 |
| 32 | +
|
| 33 | +If PR description doesn't have a link to issue, the script will complain and fail. You can manually specify it: |
| 34 | + |
| 35 | +.. code:: |
| 36 | +
|
| 37 | + scripts/pr.py merge --rebase 123 --issue 456 |
| 38 | +
|
| 39 | +The script will use given issue for commits and also will add it to PR description. |
| 40 | + |
| 41 | +Show PR info before merging it: |
| 42 | + |
| 43 | +.. code:: |
| 44 | +
|
| 45 | + scripts/pr.py show 123 |
| 46 | +
|
| 47 | +Link PR commits to issue and force-push to PR's branch, but don't merge PR: |
| 48 | + |
| 49 | +.. code:: |
| 50 | +
|
| 51 | + scripts/pr.py link 123 |
| 52 | +
|
| 53 | +Revert that: |
| 54 | + |
| 55 | +.. code:: |
| 56 | +
|
| 57 | + scripts/pr.py unlink 123 |
| 58 | +
|
| 59 | +For the full list of available options, see: |
| 60 | + |
| 61 | +.. code:: |
| 62 | +
|
| 63 | + scripts/pr.py [command] --help |
| 64 | +
|
| 65 | +Rebasing develop on master |
| 66 | +========================== |
| 67 | + |
| 68 | +This is usually done before making release. It's needed only if some commits were cherry-picked to ``master`` after ``develop`` was rebased last time. |
| 69 | + |
| 70 | +Update branches: |
| 71 | + |
| 72 | +.. code:: |
| 73 | +
|
| 74 | + git switch master && git pull origin master |
| 75 | + git switch develop && git pull origin develop |
| 76 | +
|
| 77 | +Rebase ``develop`` on ``master``: |
| 78 | + |
| 79 | +.. code:: |
| 80 | +
|
| 81 | + scripts/rebase.sh master |
| 82 | +
|
| 83 | +Push to your fork: |
| 84 | + |
| 85 | +.. code:: |
| 86 | +
|
| 87 | + git push -f <your fork> develop |
| 88 | +
|
| 89 | +When CI on your fork passes, push to origin: |
| 90 | + |
| 91 | +.. code:: |
| 92 | +
|
| 93 | + git push -f origin develop |
| 94 | +
|
| 95 | +Updating master to develop |
| 96 | +========================== |
| 97 | + |
| 98 | +Before doing this, first ensure that branches are up-to-date and ``develop`` is rebased on ``master``. |
| 99 | + |
| 100 | +Then fast-forward ``master`` to ``develop``: |
| 101 | + |
| 102 | +.. code:: |
| 103 | +
|
| 104 | + git switch master |
| 105 | + git merge --ff-only develop |
| 106 | +
|
| 107 | +Creating release |
| 108 | +================ |
| 109 | + |
| 110 | +Rename ``next`` milestone to ``v1.2.3`` and close it. Create new ``next`` milestone. |
| 111 | + |
| 112 | +Add new release to :doc:`changelog page </development/changelog>`. |
| 113 | + |
| 114 | +Update version number in `version header <https://github.com/roc-streaming/roc-toolkit/blob/develop/src/public_api/include/roc/version.h>`_. |
| 115 | + |
| 116 | +Update specs for debian and rpm packages: |
| 117 | + |
| 118 | +.. code:: |
| 119 | +
|
| 120 | + scripts/update_packages.py |
| 121 | +
|
| 122 | +Update authors page: |
| 123 | + |
| 124 | +.. code:: |
| 125 | +
|
| 126 | + scripts/update_authors.sh |
| 127 | +
|
| 128 | +Create and push tag: |
| 129 | + |
| 130 | +.. code:: |
| 131 | +
|
| 132 | + git tag v1.2.3 |
| 133 | + git push origin v1.2.3 |
| 134 | +
|
| 135 | +When CI passes, go to `releases page <https://github.com/roc-streaming/roc-toolkit/releases>`_, add links to changelog and milestone to release description, and publish release. |
| 136 | + |
| 137 | +Post announcement to matrix and, in case of big releases, to the mailing list. |
0 commit comments