maint.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. CMake Maintainer Guide
  2. **********************
  3. The following is a guide to CMake maintenance processes.
  4. See documentation on `CMake Development`_ for more information.
  5. .. _`CMake Development`: README.rst
  6. .. contents:: Maintainer Processes:
  7. Review a Merge Request
  8. ======================
  9. The `CMake Review Process`_ requires a maintainer to issue the ``Do: merge``
  10. command to integrate a merge request. Please check at least the following:
  11. * If the MR source branch is not named well for the change it makes
  12. (e.g. it is just ``master`` or the patch changed during review),
  13. add a ``Topic-rename: <topic>`` trailing line to the MR description
  14. to provide a better topic name.
  15. * If the MR introduces a new feature or a user-facing behavior change,
  16. such as a policy, ensure that a ``Help/release/dev/$topic.rst`` file
  17. is added with a release note.
  18. * If a commit changes a specific area, such as a module, its commit
  19. message should have an ``area:`` prefix on its first line.
  20. * If a commit fixes a tracked issue, its commit message should have
  21. a trailing line such as ``Fixes: #00000``.
  22. * Ensure that the MR has been tested sufficiently. Typically it should
  23. be staged for nightly testing with ``Do: stage``. Then manually
  24. review the `CMake CDash Page`_ to verify that no regressions were
  25. introduced. (Learn to tolerate spurious failures due to idiosyncrasies
  26. of various nightly builders.)
  27. .. _`CMake Review Process`: review.rst
  28. .. _`CMake CDash Page`: https://open.cdash.org/index.php?project=CMake
  29. Branch a New Release
  30. ====================
  31. This section covers how to start a new ``release`` branch for a major or
  32. minor version bump (patch releases remain on their existing branch).
  33. In the following we use the placeholder ``$ver`` to represent the
  34. version number of the new release with the form ``$major.$minor``,
  35. and ``$prev`` to represent the version number of the prior release.
  36. Review Prior Release
  37. --------------------
  38. Review the history around the prior release branch:
  39. .. code-block:: shell
  40. git log --graph --boundary \
  41. ^$(git rev-list --grep="Merge topic 'doc-.*-relnotes'" -n 1 master)~1 \
  42. $(git rev-list --grep="Begin post-.* development" -n 1 master) \
  43. $(git tag --list *-rc1| tail -1)
  44. Consolidate Release Notes
  45. -------------------------
  46. Starting from a clean work tree on ``master``, create a topic branch to
  47. use for consolidating the release notes:
  48. .. code-block:: shell
  49. git checkout -b doc-$ver-relnotes
  50. Run the `consolidate-relnotes.bash`_ script:
  51. .. code-block:: shell
  52. Utilities/Release/consolidate-relnotes.bash $ver $prev
  53. .. _`consolidate-relnotes.bash`: ../../Utilities/Release/consolidate-relnotes.bash
  54. This moves notes from the ``Help/release/dev/*.rst`` files into a versioned
  55. ``Help/release/$ver.rst`` file and updates ``Help/release/index.rst`` to
  56. link to the new document. Commit the changes with a message such as::
  57. Help: Consolidate $ver release notes
  58. Run the `Utilities/Release/consolidate-relnotes.bash` script to move
  59. notes from `Help/release/dev/*` into `Help/release/$ver.rst`.
  60. Manually edit ``Help/release/$ver.rst`` to add section headers, organize
  61. the notes, and revise wording. Then commit with a message such as::
  62. Help: Organize and revise $ver release notes
  63. Add section headers similar to the $prev release notes and move each
  64. individual bullet into an appropriate section. Revise a few bullets.
  65. Open a merge request with the ``doc-$ver-relnotes`` branch for review
  66. and integration. Further steps may proceed after this has been merged
  67. to ``master``.
  68. Update 'release' Branch
  69. -----------------------
  70. Starting from a clean work tree on ``master``, create a new ``release-$ver``
  71. branch locally:
  72. .. code-block:: shell
  73. git checkout -b release-$ver origin/master
  74. Remove the development branch release note infrastructure:
  75. .. code-block:: shell
  76. git rm Help/release/dev/0-sample-topic.rst
  77. sed -i '/^\.\. include:: dev.txt/ {N;d}' Help/release/index.rst
  78. Commit with a message such as::
  79. Help: Drop development topic notes to prepare release
  80. Release versions do not have the development topic section of
  81. the CMake Release Notes index page.
  82. Update ``Source/CMakeVersion.cmake`` to set the version to
  83. ``$major.$minor.0-rc1``:
  84. .. code-block:: cmake
  85. # CMake version number components.
  86. set(CMake_VERSION_MAJOR $major)
  87. set(CMake_VERSION_MINOR $minor)
  88. set(CMake_VERSION_PATCH 0)
  89. set(CMake_VERSION_RC 1)
  90. Update ``Utilities/Release/upload_release.cmake``:
  91. .. code-block:: cmake
  92. set(VERSION $ver)
  93. Update uses of ``DEVEL_CMAKE_VERSION`` in the source tree to mention the
  94. actual version number:
  95. .. code-block:: shell
  96. $EDITOR $(git grep -l DEVEL_CMAKE_VERSION)
  97. Commit with a message such as::
  98. CMake $major.$minor.0-rc1 version update
  99. Merge the ``release-$ver`` branch to ``master``:
  100. .. code-block:: shell
  101. git checkout master
  102. git pull
  103. git merge --no-ff release-$ver
  104. Begin post-release development by restoring the development branch release
  105. note infrastructure and the version date from ``origin/master``:
  106. .. code-block:: shell
  107. git checkout origin/master -- \
  108. Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst
  109. sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst
  110. Update ``Source/CMakeVersion.cmake`` to set the version to
  111. ``$major.$minor.$date``:
  112. .. code-block:: cmake
  113. # CMake version number components.
  114. set(CMake_VERSION_MAJOR $major)
  115. set(CMake_VERSION_MINOR $minor)
  116. set(CMake_VERSION_PATCH $date)
  117. #set(CMake_VERSION_RC 1)
  118. Commit with a message such as::
  119. Begin post-$ver development
  120. Push the update to the ``master`` and ``release`` branches:
  121. .. code-block:: shell
  122. git push --atomic origin master release-$ver:release
  123. Announce 'release' Branch
  124. -------------------------
  125. Send email to the ``[email protected]`` mailing list (perhaps
  126. in reply to a release preparation thread) announcing that post-release
  127. development is open::
  128. I've branched 'release' for $ver. The repository is now open for
  129. post-$ver development. Please rebase open merge requests on 'master'
  130. before staging or merging.