wiki:ReleaseProcedure

Version 43 (modified by Nicklas Nordborg, 6 years ago) ( diff )

Added note about JSP compilation test (#2151)

Contents

  1. Publishing a release
    1. Minor release procedure
      1. Pre-final minor release procedure
      2. Final minor release procedure
    2. Patch release procedure

Publishing a release

These instructions cover how to release minor and patch releases in a project that uses trac/subversion for revision control and project management. How to release major releases is not covered yet. Release numbering follows the normal convention of major.minor.patch and the APR (see http://apr.apache.org/versioning.html) guidelines for releases are used.

The main development is performed in the trunk branch of the repository. A new release branch is forked from the trunk for each minor release a short time period before release, and patch releases are snapshots of the minor release branch. This implies that patch work is performed in the minor release branch, and changes made release branch is transferred to the trunk every time a new patch release is made. Remember, patch work should be limited to bug fixes and important fixes only leaving development of new features and designs to the trunk branch, or other special branches.

Releases should only be performed by an appointed member of the team, the Release Manager, and merges should be performed by a Merge Manager. Of course, one team member can be both managers, thus becoming the Release and Merge Manager.

Currently, Nicklas Nordborg is the Release Manager and Merge Master.

Minor release procedure

This section describes what to do when publishing a minor release. A minor release branch is forked from the trunk when release time is getting closer. After the fork all remaining work for the associated milestone is performed in the minor branch, and if required changes made to the minor branch must be merged into the trunk.

Pre-final minor release procedure

Steps to perform prior to the finalization of the minor release

  1. Make sure that all commits are performed into to the trunk, such as acknowledge contributions (credits.txt), API changes that may affect backwards compatibility (API changes), and other files as necessary.

  2. Create the new minor
    svn copy http://base.thep.lu.se/svn/trunk \
        http://base.thep.lu.se/svn/branches/A.B-stable \
        -m "Forking new minor version A.B branch"
    
  3. Prepare the trunk for the next minor release

    1. Update version number in source:trunk/build.xml. Locate and change the below line
      <property name="base.minorversion" value="[B+1]" />
      
    2. Commit changes to the repository, svn ci -m "Changes for future release A.[B+1]"

  4. Go through the tests in the MinorReleaseTest protocol. Fixes to discovered problems should be committed the new branch.
  5. Check that JSP files can be compiled without errors ant jsp. If possible, please also fix any warnings. You'll need to configure your development environment for this to work. More information can be found in BuildingBase.

From now on, all changes needed for the minor release must be done to this new branch only. Changes made are merged into the trunk at release if required

Final minor release procedure

  1. Make sure that all commits are performed into to the minor branch, such as bumping version number(s) (build.xml), acknowledge contributions (credits.txt), API changes that may affect backwards compatibility (API changes), and other files as necessary.

    1. Update version number in build.xml. Locate and change the below lines to
      <property name="base.minorversion" value="B" />
      <property name="base.maintenanceversion" value="0" />
      <property name="base.versionsuffix" value="" />
      
      That is, make sure that minorversion has value B, maintenanceversion is 0, and versionsuffix is empty (not -dev).

    2. Update credits.txt. Remember, ego and vanity is the currency of open source projects. Well, there are other reasons for open source projects but credits.txt is for boosting peoples' ego.

    3. Make sure that the API incompatibility list is up to date API changes. This document should really be changed as the API changes, please do not leave this task to be done at the last minute of release.

    4. Make other changes as needed. If items are missing from this list, please add them with proper instructions for the items changes maintenance.

    5. Commit changes to the repository, svn ci -m "Preparing release A.B"

  2. Needless to say, make sure that the program is in a state to be released; make sure that all the tests pass, test the distribution package, and perform all other release tests you think is appropriate. If you fail in this step, please resolve the issues and restart these procedures.
    1. Make sure the tests in the MinorReleaseTest protocol has been done.
    2. Create an empty test database
    3. Setup 'base.config' for the tests.
    4. Perform the following sequence of commands
      ant test
      cd build/test
      ./run.sh TestAll -s
      
      The -s option above will generate less output from the test program.

  3. Create a tag using a one liner like
    svn copy http://base.thep.lu.se/svn/branches/A.B-stable \
        http://base.thep.lu.se/svn/tags/A.B \
        -m "Tagging version A.B"
    
  4. Update the version list in Trac using the trac-admin tool.

  5. Create the distribution package:
    svn co http://base.thep.lu.se/svn/tags/A.B A.B_dist
    cd A.B_dist
    ant package
    
    Upload the new files to the http://base.thep.lu.se/chrome/site/files/base/ (/srv/trac/base/htdocs/files/base).

    Create a new subdirectory A.B.0 in http://base.thep.lu.se/chrome/site/files/base/jars/. Upload the base-*.jar files to the subdirectory.

  6. Upload user, admin and API documentation

    Copy all files from A.B_dist/dist/doc to http://base.thep.lu.se/chrome/site/latest/ (/srv/trac/base/htdocs/latest).

  7. Prepare the minor branch for the first patch release

    1. Check out the new minor branch
      svn co http://base.thep.lu.se/svn/branches/A.B-stable A.B
      
    2. Update version number in build.xml. Locate and change the below line
      <property name="base.maintenanceversion" value="1" />
      <property name="base.versionsuffix" value="-dev" />
      
    3. Commit changes to the repository, svn ci -m "Changes for future release A.B.1"

  8. Update DownloadPage

    1. Update the section Latest stable release to reflect the new version, that is

      • Change the version number

      • Update the package links to the new version

    2. In section BASE latest release modify the svn command to
      svn checkout http://base.thep.lu.se/svn/tags/A.B base-A.B
      
    3. In section BASE stable update link to [milestone:A.B.1 A.B.1] and modify the svn command to
      svn checkout http://base.thep.lu.se/svn/branches/A.B-stable base-A.B
      
    4. In section BASE devel update link to [milestone:A.B+1 A.B+1].

    5. Add a Base A.B subsection in the All packaged BASE releases section.

  9. Update front page

    1. Add a new entry to the News section. Remove the oldest one if the list is getting too long.

  10. If required, merge the patch release into the trunk. To avoid confusion and minimize the risk of loosing fixes, this step is only performed by the Merge Master.

    1. Checkout a pristine version of the trunk.
      svn checkout http://base.thep.lu.se/svn/trunk trunk_merge
      
    2. Merge changes into trunk. In this example the difference between minor branch at forking time and the minor release tag is merged into the trunk WC
      cd trunk_merge
      svn merge http://base.thep.lu.se/svn/branches/A.B-stable@fork_revision \
                http://base.thep.lu.se/svn/tags/A.B
      
    3. Resolve all conflicts. Run tests and perform all other appropriate tests to make sure that the merge does not create havoc. (run TestAll and perform an installation.)

    4. Commit changes to the trunk branch.
      svn commit -m "Merged pre-A.B-releases to the trunk. Delta A.B - A.B@fork_revision"
      
  11. Performing this step is to acknowledge that the merge has been performed.
    Close the milestone associated with the release and replace head with appropriate revision. Add a new milestone as needed (with an associated log link like Revision Log: log:branches/A.B-stable@3001:head in the description field).

  12. Announce the new release in the mailing list.

Patch release procedure

This section describes what to do when publishing a patch release A.B.C.

  1. Make sure that all commits are performed into to the branch, such as bumping version number(s) (build.xml), acknowledge contributions (credits.txt), API changes that may affect backwards compatibility (API changes), and other files as necessary.

    1. Update version number in build.xml. Locate and change the below line
      <property name="base.maintenanceversion" value="C" />
      <property name="base.versionsuffix" value="" />
      
    2. Update credits.txt.

    3. Make sure that the API incompatibility list is up to date API changes. This document should really be changed as the API changes, please do not leave this task to be done at the last minute of release.

    4. Make other changes as needed. If items are missing from this list, please add them with proper instructions for the items changes maintenance.

    5. Commit changes to the repository, svn ci -m "Preparing release A.B.C"

  2. Needless to say, make sure that the program is in a state to be released; make sure that all the tests pass, test the distribution package, and perform all other release tests you think is appropriate. If you fail in this step, please resolve the issues and restart these procedures.
    1. Create an empty test database
    2. Setup 'base.config' for the tests.
    3. Perform the following sequence of commands
      ant test
      cd build/test
      ./run.sh TestAll -s
      
      The -s option above will generate less output from the test program.

  3. Create a tag using a one liner like
    svn copy http://base.thep.lu.se/svn/branches/A.B-stable \
        http://base.thep.lu.se/svn/tags/A.B.C \
        -m "Tagging version A.B.C"
    
  4. Update the version list in Trac using the trac-admin tool.

  5. Create the distribution package:
    svn co http://base.thep.lu.se/svn/tags/A.B.C A.B.C_dist
    cd A.B.C_dist
    ant package
    
    Upload the new files to the http://base.thep.lu.se/chrome/site/files/base/ (/srv/trac/base/htdocs/files/base).

    Create a new subdirectory A.B.C in http://base.thep.lu.se/chrome/site/files/base/jars/. Upload the base-*.jar files to the subdirectory.

  6. Upload user, admin and API documentation

    Copy all files from A.B.C_dist/dist/doc to http://base.thep.lu.se/chrome/site/latest/ (/srv/trac/base/htdocs/latest).

  7. Prepare the minor branch for the next patch release

    1. Update version number in build.xml. Locate and change the below line
      <property name="base.maintenanceversion" value="[C+1]" />
      <property name="base.versionsuffix" value="-dev" />
      
    2. Commit changes to the repository, svn ci -m "Changes for future release A.B.[C+1]"

  8. Update DownloadPage

    1. Update the section Latest stable release to reflect the new version, that is

      • Change the version number

      • Update the package links to the new version

    2. In section base latest release modify the svn command to
      svn checkout http://base.thep.lu.se/svn/tags/A.B.C base-A.B.C
      
    3. In section base stable update link to [milestone:A.B.[C+1] A.B.[C+1]].

    4. Add a new entry to the Base A.B subsection in the All packaged BASE releases section.

  9. Update front page

    1. Add a new entry to the News section. Remove the oldest one if the list is getting too long.

  10. Close the milestone associated with the release and replace head with appropriate revision in log link. Add a new milestone as needed (with an associated log link like Revision Log: log:branches/A.B-stable@3001:head in the description field).

  11. Announce the new release in the mailing list.

  12. Merge the patch release into the trunk. To avoid confusion and minimize the risk of loosing fixes, this step is only performed by the Merge Master.

    1. Checkout a pristine version of the trunk.
      svn checkout http://base.thep.lu.se/svn/trunk trunk_merge
      
    2. Merge changes into trunk. In this example the difference between a minor release tag and the first patch release tag is merged into the trunk WC
      cd trunk_merge
      svn merge http://base.thep.lu.se/svn/tags/A.B.[C-1] \
                http://base.thep.lu.se/svn/tags/A.B.C
      
    3. Resolve all conflicts. Run tests and perform all other appropriate tests to make sure that the merge does not create havoc. (run TestAll and perform an installation.)

    4. Commit changes to the trunk branch.
      svn commit -m "Merged patch release A.B.C to the trunk. Delta A.B.C - A.B.[C-1]"
      
Note: See TracWiki for help on using the wiki.