Files
spring-integration/docs
Chris Beams 5828134799 Make doc symlink creation more robust
:docs:uploadArchives symlink creation now checks to ensure that
any existing wildcard (e.g., 2.0.x) or 'latest-ga' symlinks do
not point to targets with greater lexical value than the version
being published. If so, the symlink will not be overwritten.

EXAMPLE

    Given an existing docs/ directory listing as follows:

        1.0.3.RELEASE
        1.0.x -> 1.0.3.RELEASE
        2.0.0.BUILD-SNAPSHOT
        2.0.0.RC1
        2.0.x -> 2.0.0.RC1
        latest-ga -> 1.0.3.RELEASE

    Upon publishing 1.0.4.RELEASE, the directory listing will update as
    follows (asterisk indicates added / changed entries):

        1.0.3.RELEASE
      * 1.0.4.RELEASE
      * 1.0.x -> 1.0.4.RELEASE
        2.0.0.BUILD-SNAPSHOT
        2.0.0.RC1
        2.0.x -> 2.0.0.RC1
      * latest-ga -> 1.0.4.RELEASE

    This functionality worked as described prior to this change.
    However, it would break down in the following scenario.  Imagine the
    existing directory listing had been as below, following the release
    of Spring Integration 2.0.0.RELEASE:

        1.0.3.RELEASE
        1.0.x -> 1.0.3.RELEASE
        2.0.0.BUILD-SNAPSHOT
        2.0.0.RC1
        2.0.0.RELEASE
        2.0.x -> 2.0.0.RELEASE
        latest-ga -> 2.0.0.RELEASE

    Note that latest-ga points to 2.0.0.RELEASE.  Prior to the changes
    in this commit, if a new GA on the 1.0.x line were to be published
    the latest-ga symlink would have been incorrectly updated:

        1.0.3.RELEASE
      * 1.0.4.RELEASE
      * 1.0.x -> 1.0.4.RELEASE
        2.0.0.BUILD-SNAPSHOT
        2.0.0.RC1
        2.0.0.RELEASE
        2.0.x -> 2.0.0.RELEASE
      ! latest-ga -> 1.0.4.RELEASE

    ! indicates the mistake. We want latest-ga to point to the latest GA
    release at all times.  This now happens, such that the directory
    listing would be updated as follows:

        1.0.3.RELEASE
      * 1.0.4.RELEASE
      * 1.0.x -> 1.0.4.RELEASE
        2.0.0.BUILD-SNAPSHOT
        2.0.0.RC1
        2.0.0.RELEASE
        2.0.x -> 2.0.0.RELEASE
        latest-ga -> 2.0.0.RELEASE

    Note that 'latest-ga' remains unchanged.

    This same logic applies when updating wildcard links.  In the rare
    case that a 1.0.4.RELEASE were published *after* a 1.0.5.RELEASE,
    the wildcard symlink will not be updated.  It will remain pointing
    to 1.0.5.RELEASE.
2010-11-09 15:46:46 -08:00
..