maint.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. Branch a New Release
  8. ====================
  9. This section covers how to start a new ``release`` branch for a major or
  10. minor version bump (patch releases remain on their existing branch).
  11. In the following we use the placeholder ``$ver`` to represent the
  12. version number of the new release with the form ``$major.$minor``,
  13. and ``$prev`` to represent the version number of the prior release.
  14. Review Prior Release
  15. --------------------
  16. Review the history around the prior release branch:
  17. .. code-block:: shell
  18. git log --graph --boundary \
  19. ^$(git rev-list --grep="Merge topic 'doc-.*-relnotes'" -n 1 master)~1 \
  20. $(git rev-list --grep="Begin post-.* development" -n 1 master) \
  21. $(git tag --list *-rc1| tail -1)
  22. Consolidate Release Notes
  23. -------------------------
  24. Starting from a clean work tree on ``master``, create a topic branch to
  25. use for consolidating the release notes:
  26. .. code-block:: shell
  27. git checkout -b doc-$ver-relnotes
  28. Run the `consolidate-relnotes.bash`_ script:
  29. .. code-block:: shell
  30. Utilities/Release/consolidate-relnotes.bash $ver $prev
  31. .. _`consolidate-relnotes.bash`: ../../Utilities/Release/consolidate-relnotes.bash
  32. This moves notes from the ``Help/release/dev/*.rst`` files into a versioned
  33. ``Help/release/$ver.rst`` file and updates ``Help/release/index.rst`` to
  34. link to the new document. Commit the changes with a message such as::
  35. Help: Consolidate $ver release notes
  36. Run the `Utilities/Release/consolidate-relnotes.bash` script to move
  37. notes from `Help/release/dev/*` into `Help/release/$ver.rst`.
  38. Manually edit ``Help/release/$ver.rst`` to add section headers, organize
  39. the notes, and revise wording. Then commit with a message such as::
  40. Help: Organize and revise $ver release notes
  41. Add section headers similar to the $prev release notes and move each
  42. individual bullet into an appropriate section. Revise a few bullets.
  43. Open a merge request with the ``doc-$ver-relnotes`` branch for review
  44. and integration. Further steps may proceed after this has been merged
  45. to ``master``.
  46. Update 'release' Branch
  47. -----------------------
  48. Starting from a clean work tree on ``master``, create a new ``release-$ver``
  49. branch locally:
  50. .. code-block:: shell
  51. git checkout -b release-$ver origin/master
  52. Remove the development branch release note infrastructure:
  53. .. code-block:: shell
  54. git rm Help/release/dev/0-sample-topic.rst
  55. sed -i '/^\.\. include:: dev.txt/ {N;d}' Help/release/index.rst
  56. Commit with a message such as::
  57. Help: Drop development topic notes to prepare release
  58. Release versions do not have the development topic section of
  59. the CMake Release Notes index page.
  60. Update ``Source/CMakeVersion.cmake`` to set the version to
  61. ``$major.$minor.0-rc1``:
  62. .. code-block:: cmake
  63. # CMake version number components.
  64. set(CMake_VERSION_MAJOR $major)
  65. set(CMake_VERSION_MINOR $minor)
  66. set(CMake_VERSION_PATCH 0)
  67. set(CMake_VERSION_RC 1)
  68. Update ``Utilities/Release/upload_release.cmake``:
  69. .. code-block:: cmake
  70. set(VERSION $ver)
  71. Update uses of ``DEVEL_CMAKE_VERSION`` in the source tree to mention the
  72. actual version number:
  73. .. code-block:: shell
  74. $EDITOR $(git grep -l DEVEL_CMAKE_VERSION)
  75. Commit with a message such as::
  76. CMake $major.$minor.0-rc1 version update
  77. Merge the ``release-$ver`` branch to ``master``:
  78. .. code-block:: shell
  79. git checkout master
  80. git pull
  81. git merge --no-ff release-$ver
  82. Begin post-release development by restoring the development branch release
  83. note infrastructure and the version date from ``origin/master``:
  84. .. code-block:: shell
  85. git checkout origin/master -- \
  86. Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst
  87. sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst
  88. Update ``Source/CMakeVersion.cmake`` to set the version to
  89. ``$major.$minor.$date``:
  90. .. code-block:: cmake
  91. # CMake version number components.
  92. set(CMake_VERSION_MAJOR $major)
  93. set(CMake_VERSION_MINOR $minor)
  94. set(CMake_VERSION_PATCH $date)
  95. #set(CMake_VERSION_RC 1)
  96. Commit with a message such as::
  97. Begin post-$ver development
  98. Push the update to the ``master`` and ``release`` branches:
  99. .. code-block:: shell
  100. git push --atomic origin master release-$ver:release
  101. Announce 'release' Branch
  102. -------------------------
  103. Send email to the ``[email protected]`` mailing list (perhaps
  104. in reply to a release preparation thread) announcing that post-release
  105. development is open::
  106. I've branched 'release' for $ver. The repository is now open for
  107. post-$ver development. Please rebase open merge requests on 'master'
  108. before staging or merging.