You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/08/20 14:58:57 UTC
(trafficserver) 04/06: Update release docs (#11682)
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit de186925871d5f4b43f8e3216eab5512f6388c46
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Thu Aug 15 16:37:45 2024 -0500
Update release docs (#11682)
* Update release docs for cmake. Make release targets more portable
* adjust for new branch policy
* Fix syntax error
---------
Co-authored-by: Chris McFarlen <cm...@apple.com>
(cherry picked from commit 652ad71469c3b2e18f3362fa5b6b7f242c0b74f6)
---
CMakeLists.txt | 67 ++++++++++++++++++++++++
doc/developer-guide/release-process/index.en.rst | 31 +++--------
2 files changed, 75 insertions(+), 23 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48a3e00a0c..10208e5862 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -821,6 +821,73 @@ configure_file(Findtsapi.cmake.in Findtsapi.cmake @ONLY)
install(FILES "${PROJECT_BINARY_DIR}/ts.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES "${PROJECT_BINARY_DIR}/Findtsapi.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+# Release Targets
+set(DISTTMP /tmp/asf-dist)
+set(DISTFILENAME trafficserver-${TS_VERSION_STRING})
+
+add_custom_target(
+ asf-distdir
+ COMMENT "Create distribution tarball for ASF"
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND rm -rf ${DISTTMP} && mkdir /tmp/asf-dist
+ COMMAND git archive --format=tar HEAD | tar -C ${DISTTMP} -xf -
+ COMMAND rm -rf ${DISTTMP}/ci
+ COMMAND grep -v img.shields.io ${DISTTMP}/README.md > ${DISTTMP}/README.md.clean
+ COMMAND mv ${DISTTMP}/README.md.clean ${DISTTMP}/README.md
+)
+
+add_custom_target(
+ asf-dist
+ COMMENT "Create distribution tarball for ASF release"
+ DEPENDS asf-distdir
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND tar -C ${DISTTMP} -c . | bzip2 -9 -c > ${DISTFILENAME}.tar.bz2
+ COMMAND rm -rf ${DISTTMP}
+)
+
+add_custom_target(
+ asf-dist-rc
+ COMMENT "Create distribution tarball for ASF release candidate"
+ DEPENDS asf-distdir
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND tar -C ${DISTTMP} -c . | bzip2 -9 -c > ${DISTFILENAME}-rc$ENV{RC}.tar.bz2
+ COMMAND rm -rf ${DISTTMP}
+)
+
+add_custom_target(
+ asf-dist-sign
+ COMMENT "Create and sign distribution tarball for ASF release"
+ DEPENDS asf-dist
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND shasum -a512 -b ${DISTFILENAME}.tar.bz2 > ${DISTFILENAME}.tar.bz2.sha512
+ COMMAND gpg --armor --output ${DISTFILENAME}.tar.bz2.asc --detach-sig ${DISTFILENAME}.tar.bz2
+)
+
+add_custom_target(
+ asf-dist-sign-rc
+ COMMENT "Create and sign distribution tarball for ASF release candidate"
+ DEPENDS asf-dist-rc
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND shasum -a512 -b ${DISTFILENAME}-rc$ENV{RC}.tar.bz2 > ${DISTFILENAME}-rc$ENV{RC}.tar.bz2.sha512
+ COMMAND gpg --armor --output ${DISTFILENAME}-rc$ENV{RC}.tar.bz2.asc --detach-sig ${DISTFILENAME}-rc$ENV{RC}.tar.bz2
+)
+
+add_custom_target(
+ release
+ COMMENT "Create release"
+ DEPENDS asf-dist-sign
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND git tag -fs -m "Release ${TS_VERSION_STRING}" ${TS_VERSION_STRING}
+)
+
+add_custom_target(
+ rel-candidate
+ COMMENT "Create release candidate"
+ DEPENDS asf-dist-sign-rc
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ COMMAND git tag -fs -m "Release Candidate ${TS_VERSION_STRING}-rc$ENV{RC}" ${TS_VERSION_STRING}-rc$ENV{RC}
+)
+
# Display build summary
include(CMakePrintHelpers)
message(STATUS "Build Summary:")
diff --git a/doc/developer-guide/release-process/index.en.rst b/doc/developer-guide/release-process/index.en.rst
index 83eb950d29..50b9694f04 100644
--- a/doc/developer-guide/release-process/index.en.rst
+++ b/doc/developer-guide/release-process/index.en.rst
@@ -66,19 +66,14 @@ Build
#. Go to the top level source directory.
-#. Check the version in ``configure.ac``. There are two values near the top that
- need to be set, ``TS_VERSION_S`` and ``TS_VERSION_N``. These are the release
- version number in different encodings.
+#. Check the version in ``CMakeLists.txt``. There is a ``project`` line near the
+ top with the version number. Make sure that is correct for the release.
-#. Check the variable ``RC`` in the top level ``Makefile.am``. This should be
- the point release value. This needs to be changed for every release
- candidate. The first release candidate is ``0`` (zero).
+#. Execute the following commands to make the distribution files where A is the
+ next release candidate number (start with 0). ::
-#. Execute the following commands to make the distribution files. ::
-
- autoreconf -i
- ./configure
- make rel-candidate
+ cmake --preset release
+ RC=A cmake --build build-release -t rel-candidate
These steps will create the distribution files and sign them using your key.
Expect to be prompted twice for your passphrase unless you use an ssh key agent.
@@ -112,17 +107,11 @@ Official Release
Build the distribution files with the command ::
- make release
+ cmake --build build-release -t release
Be sure to not have changed anything since the release candidate was built so
the checksums are identical. This will create a signed git tag of the form
-``X.Y.Z`` and produce the distribution files. Push the tag to the ASF repository
-with the command ::
-
- git push origin X.Y.Z
-
-This presumes ``origin`` is the name for the ASF remote repository which is
-correct if you originally clone from the ASF repository.
+``X.Y.Z`` and produce the distribution files.
The distribution files must be added to an SVN repository. This can be accessed
with the command::
@@ -168,7 +157,3 @@ Finally, update various files after the release:
* The ``CHANGES`` file to have a header for the next version.
-* ``configure.ac`` to be set to the next version.
-
-* In the top level ``Makefile.am`` change ``RC`` to have the value ``0``.
-