Ignore:
Timestamp:
Jul 4, 2010 11:22:15 PM (11 years ago)
Author:
lou
Message:

Release scripts *_new_release rewritten for new script architecture. Upgrades
and bug fixes for coin-functions, *_new_stable, set_externals. Correctly handle
multilevel project names (e.g., CHiPPS/Alps), CppAD version numbering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prepare_new_stable

    r1561 r1593  
    1414
    1515# Know thy self. If there are no '/' chars in the command name, we're running
    16 # in the currrent directory. Otherwise, strip the command name, leaving the
     16# in the current directory. Otherwise, strip the command name, leaving the
    1717# prefix.  Coin-functions is expected to live in the same directory.
    1818
     
    315315# Construct a build directory name.
    316316
    317 topBuildDir=${srcProj}-${newVersion}
     317topBuildDir=`echo $srcProj | sed -e 's|.*/\([^/]*\)$|\1|'`
     318topBuildDir=${topBuildDir}-${newVersion}
    318319echo "Build directory.....: $topBuildDir"
    319320
     
    328329fi
    329330echo "Checkout directory..: $coDir"
     331
     332exit
    330333
    331334echo ''
     
    362365
    363366# Find configure.ac files for the package and project and update the version.
    364 # We have no externals at this point, so there will be two files for a
    365 # standard project, one for a ThirdParty or Data project.
    366 
    367 echo ''
    368 bak_files=`find . -name 'configure.ac' | grep -v -E 'ThirdParty/.*/.*/configure.ac'`
     367# We have no externals at this point, and no third-party code, so there will
     368# be two files for a standard project, one for a ThirdParty or Data project.
     369
     370echo ''
     371bak_files=`find . -name 'configure.ac'`
    369372echo "===> Creating backup (.bak) for configure.ac files..."
    370373for i in $bak_files; do
     
    372375done
    373376
    374 echo ''
    375 echo "===> Updating version number in configure.ac files"
     377# Take the attitude that [] around parameters in AC_INIT is optional,
     378# it's the commas that count. This does make for a surpassing ugly regular
     379# expression.  A comma in the version string will cause a spectacular failure.
     380# In AC_COIN_PROJECTDIR_INIT, take the attitude that the existing parameters
     381# don't matter, we know what the release parameters should be.
     382
     383echo ''
     384echo "===> Updating version numbers in configure.ac files"
    376385for i in $bak_files; do
    377   sed -e "s|AC_INIT\(.*\),\[[^]]*\],\(.*\)|AC_INIT\1,[$newVersion],\2|" $i > bla
     386  sed -e "s|AC_INIT\(.*\),\(\[*\)[^],]*\(\]*\),\(.*\)|AC_INIT\1,\2$newVersion\3,\4|" $i > bla
    378387  mv bla $i
    379388  svn diff $i
     
    426435
    427436# We've just checked this out, no sense going back to the server for the
    428 # BuildTools version.
     437# BuildTools version. Because of the intermediate variable, newline has
     438# become space.
    429439
    430440  srcExternals=`svn propget svn:externals .`
    431441  srcBTURL=`echo $srcExternals | \
    432     sed -n -e 's/.*BuildTools https:\([^ ]*\) .*/https:\1/p'`
     442            sed -n -e 's/.*BuildTools *https:\([^ ]*\) .*/https:\1/p'`
    433443  if test -z "$srcBTURL" ; then
    434444    srcBTURL="none"
     
    461471      fi
    462472
     473      ext_isNormalURL=`isNormalURL $ext_url`
     474
    463475# Convert a trunk URL to stable unless it's listed in trunkExternals.
    464476
     
    471483          # Normal (not BuildTools/ThirdParty/Data) need a directory name,
    472484          # and it may differ from the project name. Carefully preserve it.
    473           # ThirdParty URLs include BuildTools ; both named for emphasis
    474           case $ext_url in
    475             */BuildTools/* | */ThirdParty/* | */Data/* ) ;;
    476             *) ext_tail=`extractTailFromExt $ext_oldurl`
    477                ext_url=${ext_url}${ext_tail}
    478                ;;
    479           esac
     485          if test $ext_isNormalURL = yes ; then
     486            ext_tail=`extractTailFromExt $ext_oldurl`
     487            ext_url=${ext_url}${ext_tail}
     488          fi
    480489          echo "    $ext_name $ext_oldurl ==> $ext_url"
    481490        fi
     
    487496# for the source, assuming we have one and the external has one.
    488497
    489       if test $ext_proj != BuildTools && test $srcBTURL != none ; then
    490         extBTURL=`svn propget svn:externals $ext_url`
     498      if test $ext_isNormalURL = yes &&
     499         test $ext_proj != BuildTools && test $srcBTURL != none ; then
     500        ext_url_notail=`echo $ext_url | sed -e 's,/[^/]*$,,'`
     501        extBTURL=`svn propget svn:externals $ext_url_notail`
    491502        extBTURL=`echo $extBTURL | \
    492503          sed -n -e 's/.*BuildTools https:\([^ ]*\) .*/https:\1/p'`
    493         if test -n "$extBTURL" && test "$srcBTURL" != "$extBTURL" ; then
    494           echo "    WARNING: BuildTools mismatch: $ext_url uses $extBTURL"
    495           if test $ignoreBuildToolsMismatch = 0 ; then
    496              buildtoolsMismatch=1
     504        if test -n "$extBTURL" ; then
     505          testResult=`compareURLVersions "$srcBTURL" "$extBTURL"`
     506          if test $testResult = no ; then
     507            echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
     508            if test $ignoreBuildToolsMismatch = 0 ; then
     509               buildtoolsMismatch=1
     510            fi
    497511          fi
    498512        fi
     
    504518    fi
    505519  done
     520
     521# If we have a BuildTools mismatch, and mismatch is not permitted, exit.
     522
    506523  if test $buildtoolsMismatch -gt $ignoreBuildToolsMismatch ; then
    507524    echo "Exiting due to BuildTools mismatches; use -i to ignore."
     
    568585if test $isThirdParty = yes || test $isData = yes ; then
    569586  cd ../..
    570   BuildTools/run_autotools
     587  ./BuildTools/run_autotools
    571588  cd "$coDir"
    572589else
    573   BuildTools/run_autotools
     590  ./BuildTools/run_autotools
    574591fi
    575592
     
    634651
    635652# Do we need to plug in nonexistent stable branches for circular dependencies
    636 # tested with the trunk? If so, generate a new Externals.release. This is
    637 # the only reason trunk references should appear in the externals for a
    638 # stable branch, so we don't need to check further before removing them.
     653# tested with the trunk? If so, generate a new Dependencies. This is the only
     654# reason trunk references should appear in the externals for a stable branch,
     655# so we don't need to check further before removing them.
    639656
    640657if test -n "$trunkExternals" ; then
Note: See TracChangeset for help on using the changeset viewer.