Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adding automation notes.

...

This is written primarily for Apache Tomcat release managers although it may also be of interest to anyone looking to validate and/or replicate the release process. This page uses Tomcat 7 9 as an example but the same process applies to later versions as well.

...

PS C:\Users\ISUser> choco install git svn adoptopenjdk8 ant gnupg sed xsltproc

This command will run for a while, and ask you repeatedly if it's okay to run "chocolateyInstall.ps1", which you will have to do to proceed. Once the above command has completed, you have all the software prerequisites installed and on your PATH. Well, once you quick PowerShell and launch a new CMD.EXE or PowerShell window, of course (wink)

...

...

  • Perform an git clone and switch to the correct branch
  • Edit "build.properties.default" and change the line version.suffix=-dev to version.suffix=

    • This can be done with sed -i.bak '/^version.suffix=/d' build.properties.default
  • Edit "webapps\/docs\/changelog.xml" and remove rtext="in development" from the latest version
    • This can be done with xsltproc --param asfid '[your asf id]' release.xsl webapps\docs\changelog.xml where release.xsl can be found here.
  • Commit these changes
    • git commit -a -m "Tag
      7
       9.0.94"
    • git tag
      7
       9.0.94
    • git push origin
      7
       9.0.94
  • Check the diff mailed to the dev list
  • Reset to the 9.0.x branch

I found it simplest to keep this clone for tagging to ensure no other edits found their way into the tag.

...

  • mkdir /c/releases/TOMCAT_79_0_94
  • git archive 79.0.94 | tar -x -C /c/releases/TOMCAT_79_0_94/

I'm using Git Bash for the above. Adjust as necessary for you choice of tools.

  • Add a build.properties file with the following configuration (adjust paths for your environment)
No Format

execute.validate=true

execute.test.bio=true
execute.test.nio=true
execute.test.apr=true

test.haltonfailure=true

gpg.exec=C:/Program Files (x86)/GNU/GnuPG/gpg2.exe
#gpg.exec=/usr/bin/gpg

base.path=C:/temp/libs

# Tomcat 7 currently requires both JDK 6 and JDK 7 to build a release
# JAVA_HOME system property used by Ant has to point to JDK 6 and this points to JDK 7
java.7.home=C:/Program Files (x86)/Java/jdk1.7.0_45#base.path=~/tomcat-libs
  • ant release

Notes:

  • GPG should be configured to use your Apache code signing key by default
  • I always ensured c:/temp/libs was empty so that the build had to download all the dependencies

...

Upload the contents of TOMCAT_79_0_XX/output/release to https://dist.apache.org/repos/dist/dev/tomcat/tomcat-79/

Generate the Maven artifacts

See https://github.com/apache/tomcat/blob/79.0.x/res/maven/README.txt steps 1 to 3 for the release (not step 4 until the vote passes !)

Call a vote

...

...