source: trunk/prepare_new_release @ 2071

Last change on this file since 2071 was 2071, checked in by stefan, 10 years ago

Ted's fix for getting BuildTools? URL from externals

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 23.0 KB
Line 
1#!/bin/sh
2
3# Copyright (C) 2007  International Business Machines.
4# All Rights Reserved.
5# This file is distributed under the Eclipse Public License.
6# It is part of the BuildTools project in COIN-OR (www.coin-or.org)
7#
8# $Id: prepare_new_release 2071 2011-01-06 10:10:25Z stefan $
9#
10# Author: Andreas Waechter     IBM      2007-06-21
11# Modified: Lou Hafer          SFU      2008-01-20
12#       Accommodate simultaneous creation of releases with circular
13#       dependencies.
14# Modified: Ted Ralphs         Lehigh University 2009-07-10
15#       Set libtool version info automatically
16# Modified: Lou Hafer          SFU      2010-06-02
17#       Adapt to new script architecture pioneered in *_new_stable; major
18#       rewrite.
19
20#set -x -v
21set -e
22
23# You can think of this script as having two sections: parameter parsing and
24# validation, followed by generation of the release candidate. See the help
25# message for a good description of the actions taken to generate the release
26# candidate.
27
28# Know thy self. If there are no '/' chars in the command name, we're running
29# in the currrent directory. Otherwise, strip the command name, leaving the
30# prefix.  Coin-functions is expected to live in the same directory.
31
32if expr "$0" : '.*/.*' >/dev/null 2>&1 ; then
33  cmdDir=`echo $0 | sed -e 's,\(.*\)/[^/]*,\1,'`
34else
35  cmdDir='.'
36fi
37cmdDir=`cd $cmdDir ; pwd`
38if test -r $cmdDir/coin-functions ; then
39  . $cmdDir/coin-functions
40else
41  echo "Cannot find utility functions file coin-functions; exiting."
42fi
43
44# Note that plain sh does not accept negative exit values
45
46exitValue=0
47
48# Specify the COIN URL base for convenience.
49
50coinURL="https://projects.coin-or.org/svn"
51
52# Begin parameter processing.
53
54printHelp=0
55ignoreBuildToolsMismatch=no
56mismatchBTExternals=
57suppressCheckout=0
58
59# stableURL will be the stable branch that is the parent for the release we
60# are building. We'll need to be able to distinguish ThirdParty and Data
61# builds, and BuildTools itself; they require special handling. If a project
62# is not BuildTools, ThirdParty, or Data, it's `normal'.
63# SV: I think also ThirdParty projects should be treated as 'normal', so I changed that.
64
65stableURL=
66isThirdParty=no
67isData=no
68isBuildTools=no
69isNormal=yes
70
71# cmdBTURL is required when stableURL specifies a ThirdParty or Data
72# project --- we'll need to assemble a temporary package while creating the
73# release candidate.
74
75cmdBTURL=
76
77# stableExternals specifies externals for which we are doing simultaneous
78# releases. We will use the stable branch of the external while preparing and
79# testing this release candidate, changing the Dependencies file to specify a
80# (nonexistent) release of the external at the last moment.
81
82stableExternals=
83
84# exciseExternals specifies externals that should be removed when creating the
85# new release.
86
87exciseExternals=
88
89# We need at least one parameter.
90
91if test "$#" -eq 0; then
92  printHelp=1
93else
94
95# Process the parameters. A parameter without an opening `-' is assumed to be
96# the spec for the stable branch.
97
98  while test $# -gt 0 && test $exitValue = 0 && test $printHelp = 0 ; do
99    case "$1" in
100      -h* | --h*) printHelp=1 ;;
101      -i* | --i*)
102           if expr "$1" : '.*-i.*=.*' 2>&1 >/dev/null ; then
103             mismatchBTExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
104           else
105             shift
106             mismatchBTExternals=$1
107           fi
108           if test "x$mismatchBTExternals" = "xall" ; then
109             ignoreBuildToolsMismatch=all
110           else
111             ignoreBuildToolsMismatch=partial
112           fi
113           ;;
114      -p* | --p*) suppressCheckout=1 ;;
115      -s* | --s*)
116           if expr "$1" : '.*-s.*=.*' 2>&1 >/dev/null ; then
117             stableExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
118           else
119             shift
120             stableExternals=$1
121           fi
122           ;;
123      -x* | --x*)
124           if expr "$1" : '.*-x.*=.*' 2>&1 >/dev/null ; then
125             exciseExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
126           else
127             shift
128             exciseExternals=$1
129           fi
130           ;;
131       -b* | --b*)
132           if expr "$1" : '.*-b.*=.*' 2>&1 >/dev/null ; then
133             cmdBTURL=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
134           else
135             shift
136             cmdBTURL=$1
137           fi
138           if expr "$cmdBTURL" : '.*BuildTools.*' 2>&1 >/dev/null ; then
139             case $cmdBTURL in
140               http*) ;;
141                   *) cmdBTURL=${coinURL}/$cmdBTURL
142                      ;;
143             esac
144           else
145             echo ''
146             echo "URL $cmdBTURL does not point to BuildTools."
147             echo ''
148             printHelp=1
149             exitValue=3
150            fi
151           ;;
152           
153       -*) echo "$0: unrecognised command line switch '"$1"'."
154           printHelp=1
155           exitValue=1
156           ;;
157        *) stableURL=$1
158           if expr "$stableURL" : '.*/stable/.*' 2>&1 >/dev/null ; then
159             case $stableURL in
160               http*) ;;
161               BuildTools/ThirdParty/* )
162                 stableURL=${coinURL}/$stableURL
163                 ;;
164               ThirdParty/* )
165                 stableURL=${coinURL}/BuildTools/$stableURL
166                 ;;
167               CoinAll/* )
168                 stableURL=${coinURL}/CoinBinary/$stableURL
169                 ;;
170               *) stableURL=${coinURL}/$stableURL
171                 ;;
172             esac
173           else
174             echo ''
175             echo "URL $stableURL does not specify a stable release."
176             echo ''
177             printHelp=1
178             exitValue=2
179           fi
180           ;;
181    esac
182    shift
183  done
184
185# Consistency checks: Make sure that the stable URL exists. If we're building
186# a ThirdParty or Data release, we need a BuildTools URL.
187
188  if test $printHelp = 0 && test $exitValue = 0 ; then
189    if svn list $stableURL 2>&1 >/dev/null ; then
190      :
191    else
192      echo "Stable URL $stableURL does not seem to exist."
193      printHelp=1
194      exitValue=5
195    fi
196  fi
197  if test $printHelp = 0 && test $exitValue = 0 ; then
198    case $stableURL in
199      *ThirdParty/* )
200        isThirdParty=yes
201        ;;
202      *Data/* )
203        isData=yes
204        isNormal=no
205        ;;
206      *BuildTools/* )
207        isBuildTools=yes
208        isNormal=no
209        ;;
210      *)
211        ;;
212    esac
213    if test $isThirdParty = yes || test $isData = yes ; then
214      if test -z $cmdBTURL ; then
215        echo "You must provide a BuildTools URL to build a ThirdParty or Data project."
216        printHelp=1
217        exitValue=4
218      else
219        if svn list $cmdBTURL 2>&1 >/dev/null ; then
220          :
221        else
222          echo "BuildTools URL $cmdBTURL does not seem to exist."
223          printHelp=1
224          exitValue=6
225        fi
226      fi
227    fi
228  fi
229fi  # if "$#" .eq 0
230
231if test $printHelp = 1 ; then
232  cat <<EOF
233Usage: prepare_new_release <stableVer> [options]
234
235COIN standard practice is to generate periodic releases by taking a snapshot
236of the stable branch of the project.  You can use this script to prepare
237a new release based on the specified stable branch.
238
239<stableVer> specifies the stable branch of your project to be used to
240create the new release.  You can specify the entire URL, or you just enter
241what comes after "https://projects.coin-or.org/svn".  A typical example is
242
243  prepare_new_release Ipopt/stable/3.3
244
245Options:
246  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
247                        for a ThirdParty or Data project.
248  -i <projectlist>      Ignore BuildTools version mismatches for the listed
249                        externals (comma-separated list of project names,
250                        e.g., -i Osi,Cbc). '-i all' ignores all mismatches.
251  -p                    Suppress checkout (useful for testing)
252  -s <projectlist>      Suppress conversion from stable to release for the
253                        listed externals (comma-separated list of project
254                        names).
255  -x <projectlist>      Remove the listed projects from the list of externals
256                        (comma-separated list of project names).
257
258This script will do the following:
259
260  - Automatically determine the next release number (X.Y.0 if this is the
261    first release for stable/X.Y, otherwise one greater than any existing
262    release)
263  - Check out a clean copy of the specified stable branch, without externals
264  - Make sure that the svn:externals property points to releases, with the
265    exception of projects in the list specified with -s.
266  - Create a new package configure.ac file with the release version number
267    specified in the AC_INIT macro.
268  - Use the "get.*" scripts to download any ThirdParty code.
269  - Execute run_autotools to update configure, Makefile.in, etc., to reflect
270    the most recent release of BuildTools.
271  - Run the configure script, compile the code, and run the unit test.
272  - Replace stable externals for projects specified with -s with the
273    appropriate (yet to be committed) release.
274
275If there is any error during these tasks the script will stop and you should
276examine the output.
277
278If the script completes without error, examine the output, particularly the
279output of the unit test ('make test') and the set of externals specified in
280the Dependencies file.
281
282This script does not make any changes to the repository.  If you want to
283commit the new release, run the "commit_new_release" script, as described
284at the end of the output.
285
286EOF
287fi
288
289if test $exitValue != 0 || test $printHelp = 1 ; then
290  exit $exitValue
291fi
292
293# End of parameter parsing. We have a stable URL to work with.  Tell the
294# user what we've seen.
295
296stableURL=`echo $stableURL | sed -e 's|/$||'`
297stableProj=`extractProjFromURL $stableURL`
298majVer=`extractMajorFromURL $stableURL`
299minVer=`extractMinorFromURL $stableURL`
300stableVer=$majVer.$minVer
301echo "Stable URL..........: $stableURL"
302echo "Stable project......: $stableProj"
303echo "Stable branch.......: $stableVer"
304if test -n "$stableExternals" ; then
305  echo "Stable externals....: $stableExternals."
306fi
307
308# Find out the most recent release (if any) for the stable branch, then
309# construct the revision number of the new release. If there are existing
310# releases, it's a matter of bumping the revision number and inserting the
311# new revision in the URL. Otherwise, we know the new revision is 0 and we
312# can simply tweak the stable URL.
313
314releaseURL=`bestRelease $stableURL $majVer $minVer | sed -e 's|/$||'`
315if test -n "$releaseURL" ; then
316  curRel=`extractReleaseFromURL $releaseURL`
317  existingURL=$releaseURL
318  newRel=`expr $curRel + 1`
319else
320  curRel=-1
321  releaseURL=`echo $stableURL | sed -e s/stable/releases/`
322  existingURL="none"
323  newRel=0
324fi
325newVer=$majVer.$minVer.$newRel
326releaseURL=`replaceVersionInURL $releaseURL $majVer $minVer $newRel`
327
328echo "Top release URL.....: $existingURL"
329echo "New release URL.....: $releaseURL"
330
331# Relevant only if we're building ThirdParty or Data
332
333if test $isThirdParty = yes || test $isData = yes ; then
334  echo "BuildTools URL......: $cmdBTURL"
335fi
336
337# We need a libtool version number only for normal projects
338
339if test $isNormal = yes ; then
340  newLTCurrent=`calcLibtoolAge $stableURL -1`
341  newLTRevision=$newRel
342  newLTAge=`calcLibtoolAge $stableURL $majVer`
343  newLTAge=`expr $newLTAge - 1`
344  newLTVer=${newLTCurrent}:${newLTRevision}:${newLTAge}
345  echo "Libtool version.....: $newLTVer"
346fi
347
348# Now decide where to build and check out code. If the stable project name
349# contains a '/', strip it out to make the build and checkout directories.
350
351topBuildDir=`echo $stableProj | sed -e 's|.*/\([^/]*\)$|\1|'`
352topBuildDir="${topBuildDir}-${newVer}"
353if test $isThirdParty = yes; then
354  coDir=$topBuildDir/Thirdparty/$stableProj
355elif test $isData = yes; then
356  coDir=$topBuildDir/Data/$stableProj
357else
358  coDir=$topBuildDir
359fi
360echo "Build directory.....: $topBuildDir"
361echo "Checkout directory..: $coDir"
362
363# Check out the stable branch that'll be the base of the new release. No
364# externals at this point. Creating a release of a ThirdParty or Data project
365# requires a bit of work, as we need to assemble a temporary package with a
366# BuildTools external.
367
368echo ''
369echo "===> Checking out stable release $stableVer without externals..."
370echo ''
371
372rm -rf $topBuildDir
373cmd="svn co --ignore-externals $stableURL $coDir"
374if test $suppressCheckout = 1 ; then
375  echo "Pretending to do: $cmd"
376else
377  rm -rf $topBuildDir
378  echo $cmd
379  eval $cmd
380fi
381
382if test $isThirdParty = yes || test $isData = yes; then
383  echo ''
384  echo '===> Checking out BuildTools (Data or ThirdParty) ...'
385  echo ''
386  cmd="svn co $cmdBTURL $topBuildDir/BuildTools"
387  if test $suppressCheckout = 1 ; then
388    echo "Pretending to do: $cmd"
389  else
390    echo $cmd
391    eval $cmd
392  fi
393fi
394
395startDir=`pwd`
396coDir=`cd $coDir; pwd`
397topBuildDir=`cd $topBuildDir; pwd`
398
399cd $coDir
400
401# Find configure.ac files for the package and project and update the version.
402# We have no externals or third-party code at this point, so there will be
403# two files for a normal project, one for a ThirdParty or Data project, and
404# none for BuildTools.
405
406echo ''
407echo "===> Checking for configure.ac files ..."
408bak_files=`find . -name 'configure.ac'`
409
410if test -n "$bak_files" ; then
411  for i in $bak_files; do
412    cp $i $i.bak
413  done
414
415# Take the attitude that [] around parameters in AC_INIT is optional,
416# it's the commas that count. This does make for a surpassing ugly regular
417# expression.  A comma in the version string will cause a spectacular failure.
418# In AC_COIN_PROJECTDIR_INIT, take the attitude that the existing parameters
419# don't matter, we know what the release parameters should be.
420
421  echo ''
422  echo "===> Updating version numbers in configure.ac files ..."
423  for i in $bak_files; do
424    sed -e "s|AC_INIT\(.*\),\(\[*\)[^],]*\(\]*\),\(.*\)|AC_INIT\1,\2$newVer\3,\4|" $i > bla
425    mv bla $i
426    lastComponent=`echo $stableProj | sed -e 's|.*/\([^/][^/]*\)|\1|'`
427    sed -e "s|AC_COIN_PROJECTDIR_INIT(.*)|AC_COIN_PROJECTDIR_INIT\($lastComponent,$newLTCurrent:$newLTRevision:$newLTAge\)|" $i > bla
428    mv bla $i
429    svn diff $i
430  done
431else
432  echo "    ... none to process."
433fi
434
435# Find ProjConfig.h. If there's a definition for PROJ_VERSION, adjust it and
436# add ProjConfig.h.bak to the list of files to be restored.
437
438stableProjUC=`echo $stableProj | tr '[a-z]' '[A-Z]'`
439configFileLoc=`find . -name '*Config.h' -print`
440if test -n "$configFileLoc" ; then
441  versionSym=${stableProjUC}_VERSION
442  echo ''
443  echo "===> Updating $versionSym in $configFileLoc (if present)"
444  echo ''
445  mv $configFileLoc $configFileLoc.bak
446  bak_files="$bak_files $configFileLoc"
447  sed -e "s/# *define $versionSym.*\$/#define $versionSym \"$newVer\"/" <$configFileLoc.bak >$configFileLoc
448  svn diff $configFileLoc
449fi
450
451# Look for a file specifying externals.
452
453srcDepFile=
454for file in Dependencies Externals ; do
455  if test -r $file ; then
456    srcDepFile=$file
457    break
458  fi
459done
460
461# Now generate a proper Dependencies file for the release.  Each line
462# in a Dependencies file has the format <ext_name> <ext_url>.  Normally,
463# each <ext_url> should be a stable branch.  References to stable branches
464# will be converted to references to releases unless the reference is to
465# a project in the stableExternals list (in which case it'll be converted
466# at the very end). References to releases are not changed. References to
467# trunk are an error. Failure to find a release for an external not in the
468# stableExternals list is an error. Save the existing externals and srcDepFile,
469# as we'll probably change both.
470
471if test -n "$srcDepFile" ; then
472
473  svn propget svn:externals . > .Externals.original
474  bak_files="$bak_files $srcDepFile"
475  cp $srcDepFile $srcDepFile.bak
476
477  echo ''
478  echo "===> Checking externals in $srcDepFile ..."
479  echo ''
480
481# Because we're working directly from command output, the regular expression
482# must check for lines.
483
484  ourBTURL=`svn propget svn:externals . | \
485            sed -n -e 's/^BuildTools *https:\([^ ]*\)$/https:\1/p'`
486  if test -z "$ourBTURL" ; then
487    ourBTURL=none
488  fi
489  echo "Our BuildTools...:    $ourBTURL"
490
491  rm -f Dependencies
492  ext_name=
493  ext_url=
494  buildtoolsMismatch=0
495  for i in `cat $srcDepFile.bak`; do
496    if test "$ext_name" = ""; then
497      ext_name="$i"
498    else
499      ext_url=$i
500      if expr "$ext_name" : '#.*' 2>&1 >/dev/null ; then
501        echo "    $ext_name $ext_url ==> skipped"
502        ext_name=
503        continue
504      fi
505      ext_urltype=`extractTypeFromURL $ext_url`
506      ext_proj=`extractProjFromURL $ext_url`
507
508# See if this external should be dropped.
509
510      if expr "$exciseExternals" : '.*'$ext_proj'.*' 2>&1 > /dev/null ; then
511        echo "    $ext_name $ext_url ==> excised"
512        ext_name=
513        continue
514      fi
515
516# External must be a stable or a release.
517
518      if test $ext_urltype != stable && test $ext_urltype != release ; then
519        echo ''
520        echo "===> The external URL $ext_url is not a stable branch or release. Exiting."
521        echo ''
522        exit 2
523      fi
524
525      ext_isNormal=`isNormalURL $ext_url`
526
527# Convert stable branches to releases unless listed in stableExternals.
528# Existing releases are unchanged.
529
530      if test $ext_urltype = stable ; then
531        if expr "$stableExternals" : '.*'"$ext_proj"'.*' 2>&1 >/dev/null ; then
532          echo "    $ext_name $ext_url unchanged"
533          ext_rel_url=$ext_url
534        else
535          ext_majVer=`extractMajorFromURL $ext_url`
536          ext_minVer=`extractMinorFromURL $ext_url`
537          ext_rel_url=`bestRelease $ext_url $ext_majVer $ext_minVer`
538          if test -z "$ext_rel_url" ; then
539            echo ''
540            echo "===> No release for $ext_url. Exiting."
541            echo ''
542            exit 2
543          fi
544          # Normal (not BuildTools/ThirdParty/Data) need a directory name,
545          # and it may differ from the project name. Carefully preserve it.
546          if test $ext_isNormal = yes ; then
547            ext_tail=`extractTailFromExt $ext_url`
548            ext_rel_url=${ext_rel_url}${ext_tail}
549          fi
550          echo "    $ext_name $ext_url ==> $ext_rel_url"
551        fi
552      else
553        ext_rel_url=$ext_url
554        echo "    $ext_name $ext_url ==> unchanged"
555      fi
556
557# Get the BuildTools URL for the external and compare to the BuildTools URL
558# for the source, assuming we have one and the external has one. We only need
559# to do this for normal URLs, and we need to strip the tail.
560
561      if test $ext_isNormal = yes &&
562         test $ext_proj != BuildTools && test $ourBTURL != none ; then
563        ext_rel_url_notail=`echo $ext_rel_url | sed -e 's,/[^/]*$,,'`
564        extBTURL=`svn propget svn:externals $ext_rel_url_notail`
565        extBTURL=`echo $extBTURL | \
566          sed -n -e 's/^BuildTools *https:\([^ ]*\) *$/https:\1/p'`
567        if test -n "$extBTURL" ; then
568          testResult=`compareURLVersions "$ourBTURL" "$extBTURL"`
569          if test $testResult = no ; then
570            if test $ignoreBuildToolsMismatch = all || \
571               expr "$mismatchBTExternals" : '.*'$ext_proj'.*' 2>&1 >/dev/null ; then
572              echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
573            else
574              buildtoolsMismatch=1
575              echo "    ERROR: BuildTools mismatch: $ext_url_notail uses $extBTURL"
576            fi
577          fi
578        fi
579      fi
580      echo "$ext_name  $ext_rel_url" >>Dependencies
581      ext_name=
582      echo ''
583    fi
584  done
585
586# If we have a BuildTools mismatch, exit.
587
588  if test $buildtoolsMismatch = 1 ; then
589    echo "Exiting due to BuildTools mismatches; use -i to ignore."
590    exit 2
591  fi
592
593# Try to check out the externals. Try three times before failing.
594  echo ''
595  echo '===> Updating svn:externals property and checking out externals ...'
596  echo ''
597
598  svn propset svn:externals -F Dependencies .
599  svn update ||
600  { echo "Retry 1 ... " ; svn update ; } ||
601  { echo "Retry 2 ... " ; svn update ; } ||
602  { echo "Checkout of externals failed. Aborting." ; exit 3 ; }
603
604  if test -d ThirdParty ; then
605    echo ''
606    echo '===> Downloading ThirdParty code ...'
607    echo ''
608
609    ext_name=
610    ext_url=
611    for i in `svn propget svn:externals .` ; do
612      if test -z "$ext_name" ; then
613        ext_name="$i"
614      else
615        ext_url=$i
616        if expr "$ext_name" : 'ThirdParty/.*' 2>&1 >/dev/null ; then
617          cd $ext_name
618          ext_proj=`extractProjFromURL $ext_url`
619          getScript=get.$ext_proj
620          if test -x "$getScript" ; then
621            ./$getScript -patch
622          fi
623          cd $coDir
624        fi
625        ext_name=
626      fi
627    done
628  fi
629fi
630
631# Finally! Done processing externals. If this is a ThirdParty project, we
632# still have to run the get script.
633
634if test $isThirdParty = yes ; then
635  if test -x get.$stableProj ; then
636    echo ''
637    echo '===> Downloading third party code ...'
638    echo ''
639    ./get.$stableProj
640  fi
641fi
642
643# Don't run run_autotools for BuildTools!
644
645if test $isBuildTools = no ; then
646  echo ''
647  echo '===> Running BuildTools/run_autotools ...'
648  echo ''
649  if test $isThirdParty = yes || test $isData = yes ; then
650    cd ../..
651    ./BuildTools/run_autotools
652    cd "$coDir"
653  elif test $isNormal = yes ; then
654    ./BuildTools/run_autotools
655  fi
656fi
657
658# Let's see if it works. We only run tests for normal projects. DO NOT turn
659# on --enable-maintainer-mode in the initial configure command. At the least,
660# it's not needed. At the worst, as of 100526, it'll undo all the careful
661# work above to set externals.
662
663if test $isNormal = yes ; then
664  (set -e
665   echo ''
666   echo '===> Creating build directory and running the configuration script...'
667   echo ''
668   mkdir build
669   cd build
670   cmd="$coDir/configure -C"
671   echo $cmd
672   eval $cmd
673   echo ''
674   echo '===> Compiling code...'
675   echo ''
676   cmd='make install'
677   echo $cmd
678   eval $cmd
679   echo ''
680   echo '===> Running the unit test...'
681   echo ''
682   echo '*******************************************************************************'
683   echo '***                                                                         ***'
684   echo '***                       BEGIN OUTPUT OF MAKE TEST                         ***'
685   echo '***                                                                         ***'
686   echo '*******************************************************************************'
687   echo ''
688   cmd='make test'
689   echo $cmd
690   eval $cmd
691   echo ''
692   echo '*******************************************************************************'
693   echo '***                                                                         ***'
694   echo '***                        END OUTPUT OF MAKE TEST                          ***'
695   echo '***                                                                         ***'
696   echo '*******************************************************************************'
697  )
698  if test $? != 0; then
699    echo ''
700    echo 'Error during build or test'
701    echo ''
702    exit 3
703  fi
704  echo ''
705  echo '===> ALL TESTS PASSED'
706fi
707
708echo ''
709if test $isNormal = yes ; then
710  echo 'Please review the output above, particularly the one of make test.'
711else
712  echo 'Please review the output above.'
713fi
714echo ''
715
716# Do we need to plug in nonexistent releases for circular dependencies tested
717# with the stable versions? If so, generate a new Dependencies. This is the
718# only reason stable references should appear in the externals for a release,
719# so we don't need to check further before removing them.
720
721if test -n "$stableExternals" ; then
722  echo "===> Grooming externals to remove stable externals used for testing ..."
723  mv Dependencies Dependencies.temp.$$
724  ext_name=
725  ext_url=
726  for i in `cat Dependencies.temp.$$`; do
727    if test "$ext_name" = ""; then
728      ext_name="$i"
729    else
730      ext_url=$i
731      ext_urltype=`extractTypeFromURL $ext_url`
732      ext_proj=`extractProjFromURL $ext_url`
733      if test $ext_urltype = stable ; then
734        ext_rel_url=$ext_url
735        ext_majVer=`extractMajorFromURL $ext_url`
736        ext_minVer=`extractMinorFromURL $ext_url`
737        ext_rel_url=`echo $ext_url | sed -e 's,/stable/,/releases/,'`
738        ext_rel_url=`replaceVersionInURL $ext_rel_url $ext_majVer $ext_minVer 0`
739        echo "    $ext_name $ext_url ==> $ext_rel_url"
740      else
741        ext_rel_url=$ext_url
742      fi
743      echo "$ext_name  $ext_rel_url" >>Dependencies
744      ext_name=
745    fi
746  done
747  rm -f Dependencies.temp.$$
748  svn propset -F Dependencies svn:externals .
749  echo ''
750fi
751
752if test -r Dependencies ; then
753  echo 'Also, please confirm the externals are correct:'
754  svn propget svn:externals
755fi
756
757echo ''
758echo 'After reviewing the output above, you can create a new release by going into'
759echo 'the directory'
760echo ''
761echo "          $startDir"
762echo ''
763echo "and run the commit_new_release script"
764
765cd $topBuildDir
766
767cat >.new_release_data <<EOF
768coinURL=$coinURL
769startDir=$startDir
770topBuildDir=$topBuildDir
771coDir=$coDir
772releaseURL=$releaseURL
773stableURL=$stableURL
774newVer=$newVer
775bak_files="$bak_files"
776EOF
Note: See TracBrowser for help on using the repository browser.