Ignore:
Timestamp:
Oct 9, 2008 8:40:59 PM (13 years ago)
Author:
lou
Message:

Long-promised revised versions of release scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/commit_new_release

    r728 r1211  
    99#
    1010# Author: Andreas Waechter     IBM      2007-06-21
     11# Modified by: Lou Hafer       SFU      2008-04-17
    1112
    1213#set -x -v
    1314
    1415set -e
     16
     17# Remember what was done during release generation.
    1518
    1619if test -r .new_release_data; then
     
    2225  exit -1;
    2326fi
     27
     28# Commit the release to stable so we can do a repository-side copy to create
     29# the release.
    2430
    2531echo ''
     
    3440eval $cmd
    3541
    36 cmd='svn update'
     42# Update to confirm the commit. Avoid pulling in externals --- if we're doing
     43# circular dependencies, they may not exist. As it stands, the main purpose of
     44# this call is to allow us to easily obtain the current revision. It might be
     45# useful to strengthen this and check that the value is what we're expecting
     46# --- one greater than the revision before commit. `--ignore-externals' could
     47# be made provisional on the existence of circular dependency by passing a
     48# boolean through .new_release_data. This would strengthen the update, in that
     49# the update would confirm existence of the externals.
     50
     51cmd='svn update --ignore-externals'
    3752echo $cmd
    3853eval $cmd
     
    4156echo "Current revision number is: $rev_num"
    4257
     58# Create the release with a repository-side copy.
     59
    4360echo ''
    44 echo "===> Creating new release $new_ver from stable $stable_branch (rev $rev_num)..."
     61echo "===> Creating new release $new_ver from stable $stableBranch (rev $rev_num)..."
    4562echo ''
    4663
    47 new_rel_url=$base_url/releases/$new_ver
    48 cmd="svn copy -m \"creating releases/$new_ver from stable/$stable_branch (rev $rev_num)\" $stable_url $new_rel_url"
     64cmd="svn copy -m \"creating releases/$new_ver from stable/$stableBranch (rev $rev_num)\" $stableURL $releaseURL"
    4965echo $cmd
    5066eval $cmd
     67
     68# And restore the stable branch to it's original condition. Start by reverting
     69# to the original externals.
    5170
    5271if test -r Externals; then
     
    5978fi
    6079
    61 conf_ac_files=`find . -name 'configure.ac' | grep -v -E 'ThirdParty/.*/.*/configure.ac'`
     80# Revert the package id in configure.ac and propagate with run_autotools.  Note
     81# that this does not exclude configure.ac for externals in the normal place.
     82# But since changes to externals are not swept up by the commit, it doesn't
     83# matter. On the other hand, if this whole checkout is a temporary for the
     84# purpose of release generation, I'm not entirely convinced we need to bother
     85# to exclude configure.ac in the actual ThirdParty code base. Comments from
     86# ThirdParty maintainers welcome.
     87
     88conf_ac_files=`find . -name 'configure.ac' | grep -v -E '.*/.*/configure.ac'`
    6289
    6390echo ''
    64 echo "===> Restoring version number (${stable_branch}stable) in configure.ac files"
     91echo "===> Restoring version number (${stableBranch}stable) in configure.ac files"
    6592for i in $conf_ac_files; do
    66   sed -e "s|AC_INIT\(.*\)\[[0-9\.]*\],\(.*\)|AC_INIT\1[${stable_branch}stable],\2|" $i > bla
     93  sed -e "s|AC_INIT\(.*\)\[[0-9\.]*\],\(.*\)|AC_INIT\1[${stableBranch}stable],\2|" $i > bla
    6794  mv bla $i
    6895  svn di $i
     
    73100echo ''
    74101curdir=`pwd`
    75 cd $tmpbas
     102cd $buildBase
    76103BuildTools/run_autotools
    77104cd "$curdir"
     105
     106# Commit the restored stable branch.
    78107
    79108echo ''
     
    81110echo ''
    82111
    83 cmd="svn ci -m \"restoring stable/$stable_branch\""
     112cmd="svn ci -m \"restoring stable/$stableBranch\""
    84113echo $cmd
    85114eval $cmd
    86115
    87116echo ''
    88 echo "Done, new release $new_rel_url created"
     117echo "Done, new release $releaseURL created"
    89118echo ''
    90 echo "You can now delete the directory $tmpbas including subdirectories"
     119echo "You can now delete the directory $buildBase including subdirectories"
    91120
    92121rm .new_release_data
Note: See TracChangeset for help on using the changeset viewer.