Several of the steps in the SDK Release Manager's Guide have been incorporated into Ant Scripts.  The Ant Scripts have been used on a Mac to produce several releases, but may have issues on Windows, and may need improvements.  The original guide uses Bash Shell Scripts which require a Bash Shell on Windows.  Ant Scripts are better supported across Mac and Windows.

releasecandidate.xml

Many of our repos have a releasecandidate.xml Ant Script.  This script attempts to perform all of the steps required after the release branch has been setup, except for publishing ASDoc on the web site, updating the Installer after the release has been propagated to the mirrors, and merging the release branch with the "develop" and "master" branches.

To create a release candidate, first setup a local.properties file in the repo.  The scripts expect that Git is available from the command line simply by running "git" and that you will launch the script from the root of the repo's working copy.  The local.properties file tells the script where to find both SVN and the SVN repos used for our web site and for distributing release candidates and approved releases.   Here is a sample local.properties.  Update the properties for your system:

my.name=Alex Harui
svn.dist.dev=/Users/aharui/svn/apache/dist/dev
svn.dist.release=/Users/aharui/svn/apache/dist/release
svn.site=/Users/aharui/svn/apache/site
svn=/usr/bin/svn

The script also expects that you have the environment variables set up to run Ant and build the repo.  So for many of our products, that would be things like AIR_HOME and FLASHPLAYER_DEBUGGER.  See the README for what variables are needed.

Then simply run:

ant -f releasecandidate.xml -Drelease.version=<release version> -Drc=<rc number>

For example, for RC 1 of Apache Flex SDK 4.17.0, the command would be:

ant -f releasecandidate.xml -Drelease.version=4.17.0 -Drc=1

The script will do all of the following:

  • Ask for your Git/SVN username and password (the password is not obfuscated so be aware of who can see your screen)
  • Create the appropriate folders on the distribution server for RCs
  • git pull --rebase the latest changes into the repo's working copy
  • Stage the RC by running all of the other Ant scripts required
  • Copy the results to the distribution server for RCs
  • Tag the release
  • Update the Installer so folks can try to install the RC
  • Use mailto: to draft two emails to send with appropriate subject lines.

(There is a -Dtag=<tag> option that will checkout a tag instead of building the RC from the head).

When all of this is done, there should be two draft emails for you to complete with details about the release and hit send to send to the voters.  You also have to use ASF CMS to push the Installer changes to the web-site.

These scripts were written so the Release Manager doesn't make silly mistakes about version and RC numbers in the artifact names and emails.

 

When a release is finally approved, you can run releasecandidate.xml with the following options:

ant -f releasecandidate.xml -Drelease.version=<release version> -Drc=<approved RC number> release

This will move the approved RC artifacts to the actual release distribution server and tag the release.  The script should end with a reminder to wait 24 hours or more for mirror propagation before updating the Installer.

Release Voter Ant Scripts

The mailto: emails generated by the releasecandidate.xml script reference and describe how to use the release voter script, which is uploaded to the RC distribution server along with the other RC artifacts.  These voter scripts generally have the name ApproveXXX.xml, such as ApproveFlexJS.xml.  These scripts don't actually test the release, they simply run a set of commands to generate console output for the voter to review and approve.  The goal is to save time for folks by not having to remember or read a set of commands and make sure they review the right artifacts and don't forget important things to check.  The scripts contain what we think are the minimum set of things to review before voting.  Other checks and tests are welcome.

These scripts can also run the review sequence on artifacts generated by the CI server's Ant builds on the release branch, so it is a good way to check on what is likely to be voted on before we spend the time running the releasecandidate.xml script and sending emails to everyone.

To review the artifacts, first make sure you have GPG installed on the path and the Apache Flex committer keys loaded into GPG.  Also make sure your environment variables are set up appropriately for the build of the source artifact.  One exception is that, for ApproveFlexJS.xml, do not set FALCON_HOME, FALCONJX_HOME, FLEX_HOME or FLEXJS_TYPEDEFS_HOME.  The script will download a fresh copy of Falcon and point to it.  Otherwise you might be using an older compiler.

Then, create a new folder, copy the ApproveXXX.xml file into that folder and from that folder run:

ant -e -f ApproveXXX.xml -Drelease.version=<release version> -Drc=<RC number>

If you leave off the -Drc=<RC number> the script should pull down the last successful build from the CI server and will skip the verification of the PGP signature.

If you are having issues downloading the artifacts, you can place the artifacts manually in the folder and run the main_no_download target.

 

 

  • No labels