source: trunk/prepare_new_release @ 1364

Last change on this file since 1364 was 1364, checked in by tkr, 12 years ago

Souping up prepare_new_release

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 23.1 KB
Line 
1#!/bin/sh
2
3# Copyright (C) 2007  International Business Machines.
4# All Rights Reserved.
5# This file is distributed under the Common Public License.
6# It is part of the BuildTools project in COIN-OR (www.coin-or.org)
7#
8## $Id: prepare_new_release 1364 2009-07-22 04:24:18Z tkr $
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
17#set -x -v
18set -e
19
20# You can think of this script as having three sections: first, the following
21# function definition, then parameter parsing and validation, and finally the
22# actual generation of the release candidate. See the help message for a good
23# description of the actions taken to generate the release candidate.
24
25# Utility function to determine current or next release for a given stable
26# branch. Call is determine_release(stableURL,next). Replace next with 1 for
27# the next release, 0 for the current release. This code is needed in three
28# separate places, so it really deserves to be a function. We can hope that
29# maintainers will have a reasonably modern version of standard sh.
30
31# Data is a real pain in the **** and should be converted to the standard
32# nomenclature.
33
34#Determine revision number (patch release number--third digit in release
35# version number
36
37determine_revision ()
38{ 
39  if test $isData = no ; then
40
41    drtmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
42    drtmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
43
44    # List the existing releases and screen for releases matching stableBranch.
45
46    drtmp_svnlst=`svn list $drtmp_baseURL/releases/`
47
48    drtmp_release_vers=
49    for drtmp_i in $drtmp_svnlst ; do
50      case $drtmp_i in
51        $drtmp_stableBranch.*)
52          drtmp_i=`echo $drtmp_i | sed -e 's|/$||'`
53          drtmp_release_vers="$drtmp_release_vers $drtmp_i";;
54      esac;
55    done
56
57    # Are there any existing releases? If not, and the user didn't ask for the
58    # next release, we have an error.
59
60    if test -z "$drtmp_release_vers" ; then
61      if test $2 = 1 ; then
62        drtmp_revision=0
63      else
64        drtmp_revision="Error"
65      fi
66    else
67
68    # There are releases. If we don't have one after the loop, we're confused.
69
70      drtmp_revision=-10000
71      for drtmp_i in $drtmp_release_vers; do
72        drtmp_old_revision=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
73        if test $drtmp_old_revision -gt $drtmp_revision; then
74          drtmp_revision=$drtmp_old_revision
75        fi
76      done
77
78      if test $drtmp_revision = -10000; then
79        drtmp_revision="Error"
80      elif test $2 = 1 ; then
81        drtmp_revision=`expr $drtmp_revision + 1`
82      fi
83    fi
84   
85    # determine current and age for the purposes of libtool versioning
86
87  else  # end normal and ThirdParty, begin Data
88
89    drtmp_stableBranch=`echo $1 | sed -e 's|.*/stable/\([0-9.]*\)/.*|\1|'`
90    drtmp_baseURL=`echo $1 | sed -e 's|\(.*\)/stable/[0-9.]*/.*|\1|'`
91    drtmp_proj=`echo $1 | sed -e 's|.*/stable/[0-9.]*/||'`
92
93    # Screen for releases that match the stable branch and contain the project
94    # of interest. First, check for releases that match the stable branch. If
95    # there are none, we're release 0 for this stable branch. It's an error if
96    # there are no releases and the user did not ask for the next release. Sort
97    # by release number here, while we have newlines in the list from svn.
98
99    drtmp_svnlst=`svn list $drtmp_baseURL/releases | sort -nr -t. -k3,3`
100
101    drtmp_release_vers=
102    for drtmp_i in $drtmp_svnlst ; do
103      case $drtmp_i in
104        $drtmp_stableBranch.*)
105          drtmp_i=`echo $drtmp_i | sed -e 's|/$||'`
106          drtmp_release_vers="$drtmp_release_vers $drtmp_i";;
107      esac;
108    done
109
110    # Do we have releases that match the stable branch?
111
112    if test -z "$drtmp_release_vers" ; then
113      if test $2 = 1 ; then
114        drtmp_revision=0
115      else
116        drtmp_revision="Error"
117      fi
118    else
119
120    # Releases exist that match stable; do any contain our project? Because
121    # we presorted by release, we can break here at the first success.
122
123      drtmp_svnlst=`echo $drtmp_release_vers`
124      drtmp_release_vers=
125      for drtmp_i in $drtmp_svnlst ; do
126        case $drtmp_i in
127          $drtmp_stableBranch.*)
128            drtmp_i=`echo $drtmp_i | sed -e 's|/$||'`
129            drtmp_projlst=`2>&1 svn list $drtmp_baseURL/releases/$drtmp_i/$drtmp_proj`
130            if expr "$drtmp_projlst" : '.*non-existent.*' 2>&1 >/dev/null ; then
131              :
132            else
133              drtmp_release_vers="$drtmp_i"
134              break
135            fi
136            ;;
137        esac;
138      done
139
140      # Are there any existing releases? If no, and the user didn't ask for
141      # the next release, it's an error. Otherwise, go for release 0 of
142      # proj in the current stable branch. If there are existing releases,
143      # return either the current or +1.
144
145      if test -z "$drtmp_release_vers" ; then
146        if test $2 = 0 ; then
147          drtmp_revision="Error"
148        else
149          drtmp_revision=0
150        fi
151      else
152        drtmp_revision=-10000
153        for drtmp_i in $drtmp_release_vers; do
154          drtmp_old_revision=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"`
155          if test $drtmp_old_revision -gt $drtmp_revision; then
156            drtmp_revision=$drtmp_old_revision
157          fi
158        done
159        drtmp_revision=`expr $drtmp_revision + 1`
160      fi
161
162    fi  # for releases matching stable branch
163
164  fi    # for normal/Data
165
166  echo $drtmp_revision
167}
168
169# Determine current (the total number of stable releases over all time)
170
171determine_current ()
172{ 
173  if test $isData = no ; then
174
175    dctmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
176    dctmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
177
178    dctmp_current=`svn list $dctmp_baseURL/stable | wc -w`
179
180  else
181
182    dctmp_current=0
183
184  fi
185
186  echo $dctmp_current
187}
188
189# Determine age (the number of backwards compatible stable releases (second
190# number in stable version)
191
192determine_age ()
193{
194  if test $isData = no ; then
195
196    datmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'`
197    datmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'`
198
199    datmp_age=`echo $datmp_stableBranch | sed -e 's|[0-9].||'`
200
201  else
202
203    datmp_age=0
204
205  fi
206
207  echo $datmp_age
208}
209
210# Specify the COIN URL base for convenience.
211
212coinURL="https://projects.coin-or.org/svn"
213
214# Begin parameter processing.
215
216printHelp=0
217exitValue=0
218ignoreBuildToolsMismatch=0
219
220# stableURL will be the stable branch that is the parent for the release we
221# are building. We'll need to be able to distinguish ThirdParty and Data
222# builds; they require special handling.
223# buildToolsURL is required when stableURL specifies a ThirdParty or Data
224# project --- we'll need to assemble a temporary package while creating the
225# release candidate.
226
227stableURL=
228isThirdParty=no
229isData=no
230buildToolsURL=
231
232# stableExternals, on the other hand, specifies externals for which we are
233# doing simultaneous releases. We will use the stable branch of the external
234# while preparing and testing this release candidate, changing the Dependencies
235# file to specify a (nonexistent) release of the external at the last moment.
236
237stableExternals=
238
239# We need at least one parameter.
240
241if test "$#" -eq 0; then
242  printHelp=1
243else
244
245# Process the parameters. A parameter without an opening `-' is assumed to be
246# the spec for the stable branch.
247
248  while test $# -gt 0 && test $exitValue = 0 && test $printHelp = 0 ; do
249    case "$1" in
250      -h* | --h*) printHelp=1 ;;
251      -i* | --i*) ignoreBuildToolsMismatch=1 ;;
252      -s* | --s*)
253           if expr "$1" : '.*-s.*=.*' 2>&1 >/dev/null ; then
254             stableExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
255           else
256             shift
257             stableExternals=$1
258           fi
259           ;;
260       -b* | --b*)
261           if expr "$1" : '.*-b.*=.*' 2>&1 >/dev/null ; then
262             buildToolsURL=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
263           else
264             shift
265             buildToolsURL=$1
266           fi
267           if expr "$buildToolsURL" : '.*BuildTools.*' 2>&1 >/dev/null ; then
268             case $buildToolsURL in
269               http*) ;;
270                   *) buildToolsURL=${coinURL}/$buildToolsURL
271                      ;;
272             esac
273           else
274             echo ''
275             echo "URL $buildToolsURL does not point to BuildTools."
276             echo ''
277             printHelp=1
278             exitValue=-3
279            fi
280           ;;
281           
282       -*) echo "$0: unrecognised command line switch '"$1"'."
283           printHelp=1
284           exitValue=-1
285           ;;
286        *) stableURL=$1
287           if expr "$stableURL" : '.*/stable/.*' 2>&1 >/dev/null ; then
288             case $stableURL in
289               http*) ;;
290                   *) stableURL=${coinURL}/$stableURL
291                      ;;
292             esac
293           else
294             echo ''
295             echo "URL $stableURL does not specify a stable release."
296             echo ''
297             printHelp=1
298             exitValue=-2
299           fi
300           ;;
301    esac
302    shift
303  done
304
305# Consistency checks: Make sure that the stable URL exists. If we're building
306# a ThirdParty or Data release, we need a BuildTools URL.
307
308  if test $printHelp = 0 && test $exitValue = 0 ; then
309    if svn list $stableURL 2>&1 >/dev/null ; then
310      :
311    else
312      echo "Stable URL $stableURL does not seem to exist."
313      printHelp=1
314      exitValue=-5
315    fi
316  fi
317  if test $printHelp = 0 && test $exitValue = 0 ; then
318    case $stableURL in
319      *ThirdParty/* )
320        isThirdParty=yes
321        ;;
322      *Data/* )
323        isData=yes
324        ;;
325      *)
326        ;;
327    esac
328    if test $isThirdParty = yes || test $isData = yes ; then
329      if test -z $buildToolsURL ; then
330        echo "You must provide a BuildTools URL to build a ThirdParty or Data project."
331        printHelp=1
332        exitValue=-4
333      else
334        if svn list $buildToolsURL 2>&1 >/dev/null ; then
335          :
336        else
337          echo "BuildTools URL $buildToolsURL does not seem to exist."
338          printHelp=1
339          exitValue=-6
340        fi
341      fi
342    fi
343  fi
344fi
345
346if test $printHelp = 1 ; then
347  cat <<EOF
348Usage: prepare_new_release <stableBranch> [options]
349
350COIN standard practice is to generate periodic releases by taking a snapshot
351of the stable branch of the project.  You can use this script to prepare
352a new release based on the specified stable branch.
353
354Stable_branch specifies the stable branch of your project to be used to
355create the new release.  You can specify the entire URL, or you just enter
356what comes after "https://projects.coin-or.org/svn".  A typical example is
357
358  prepare_new_release Ipopt/stable/3.3
359
360Options:
361  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
362                        for a ThirdParty or Data project.
363  -s <projectlist>      Comma-separated list of projects with circular
364                        dependencies on this project. The stable branch of
365                        projects in this list will be used while testing, on
366                        the assumption that simultaneous releases will be
367                        created as the release candidates are committed.
368  -i                    Ignore BuildTools version mismatches in externals.
369
370This script will do the following:
371
372  - Automatically determine the next release number (X.Y.0 if this is the
373    first release for stable/X.Y, otherwise one greater than any existing
374    release)
375  - Check out a clean copy of the specified stable branch, without externals
376  - Make sure that the svn:externals property points to releases
377  - Create a new package configure.ac file with the release version number
378    specified in the AC_INIT macro.
379  - Use the "get.*" scripts to download any ThirdParty code.
380  - Execute run_autotools to update configure, Makefile.in, etc., to reflect
381    the most recent release of BuildTools.
382  - Run the configure script, compile the code, and run the unit test.
383  - Replace any stable branches in externals (specified with -s) with the
384    appropriate (yet to be committed) release.
385
386If there is any error during these tasks the script will stop and you should
387examine the output.
388
389If the script completes without error, examine the output, particularly the
390output of the unit test ('make test') and the set of externals specified in
391the Dependencies file.
392
393This script does not make any changes to the repository.  If you want to
394commit the new release, run the "commit_new_release" script, as described
395at the end of the output.
396
397EOF
398fi
399
400if test $exitValue != 0 || test $printHelp = 1 ; then
401  exit $exitValue
402fi
403
404# End of parameter parsing. We have a stable URL to work with.  Tell the
405# user what we've seen.
406
407stableURL=`echo $stableURL | sed -e 's|/$||'`
408if test $isData = yes ; then
409  stableProj=`echo $stableURL | sed -n -e 's|.*/[^/]*/stable/[0-9.]*/\(.*\)|\1|p'`
410  baseURL=`echo $stableURL | sed -e 's|\(.*\)/stable/[0-9.]*/\(.*\)|\1/_BB_/_RR_/\2|'`
411  stableBranch=`echo $stableURL | sed -e 's|.*/stable/\([0-9.]*\)/.*|\1|'`
412else
413  stableProj=`echo $stableURL | sed -n -e 's|.*/\([^/]*\)/stable/.*|\1|p'`
414  baseURL=`echo $stableURL | sed -e 's|/stable/[0-9.]*||'`
415  stableBranch=`echo $stableURL | sed -e 's|.*/stable/||'`
416fi
417echo "StableProj: $stableProj"
418echo "Base URL..........: $baseURL"
419echo "Stable URL........: $stableURL"
420echo "Stable branch.....: $stableBranch"
421if test -n "$stableExternals" ; then
422  echo "Stable externals..: $stableExternals."
423fi
424
425# Find out the most recent release (if any) for the stable branch. List the
426# existing releases and screen for releases matching stableBranch. The new
427# release should be one greater than any existing release, or 0 if the stable
428# branch has no releases.
429
430echo ''
431echo "===> Checking releases for stable branch $stableBranch ..."
432
433echo $stableURL
434new_current=`determine_current "$stableURL" 1`
435new_revision=`determine_revision "$stableURL" 1`
436new_age=`determine_age "$stableURL" 1`
437new_ver="$stableBranch.$new_revision"
438
439echo ''
440echo "New current.......: $new_current"
441echo "New revision......: $new_revision"
442echo "New age...........: $new_age"
443echo "New release.......: $new_ver"
444buildBase="${stableProj}-$new_ver"
445echo "Build directory...: $buildBase"
446if test $isData = yes ; then
447  releaseURL=`echo $baseURL | sed -e s/_BB_/releases/ -e s/_RR_/$new_ver/`
448else
449  releaseURL="$baseURL/releases/$new_ver"
450fi
451echo "Release URL.......: $releaseURL"
452
453# Check out the stable branch that'll be the base of the new release. No
454# externals at this point. Creating a release of a ThirdParty or Data project
455# requires a bit of work, as we need to assemble a temporary package with a
456# BuildTools external.
457
458echo ''
459echo "===> Checking out stable release $stableBranch without externals..."
460echo ''
461
462if test $isThirdParty = yes; then
463  coDir=$buildBase/a/b
464elif test $isData = yes; then
465  coDir=$buildBase/a/b
466else
467  coDir=$buildBase
468fi
469echo "Checkout directory: $coDir"
470
471rm -rf $buildBase
472cmd="svn co --ignore-externals $stableURL $coDir"
473echo $cmd
474eval $cmd
475
476if test $isThirdParty = yes || test $isData = yes; then
477  echo ''
478  echo '===> Checking out BuildTools for ThirdParty project...'
479  echo ''
480  cmd="svn co $buildToolsURL $buildBase/BuildTools"
481  echo $cmd
482  eval $cmd
483fi
484
485coDir=`cd $coDir; pwd`
486buildBase=`cd $buildBase; pwd`
487
488cd $coDir
489
490# Find configure.ac files for the package and project and update the version.
491# We have no externals at this point, so there will be two files for a
492# standard project, one for a ThirdParty project, and none for a Data project.
493
494echo ''
495conf_ac_files=`find . -name 'configure.ac' | grep -v -E 'ThirdParty/.*/.*/configure.ac'`
496echo "===> Creating backup (.bak) for configure.ac files..."
497for i in $conf_ac_files; do
498  cp $i $i.bak
499done
500
501echo ''
502echo "===> Updating version numbers in configure.ac files"
503for i in $conf_ac_files; do
504  sed -e "s|AC_INIT\(.*\)\[[0-9A-Za-z\.]*\],\(.*\)|AC_INIT\1[$new_ver],\2|" $i > bla
505  mv bla $i
506  sed -e "s|AC_COIN_PROJECTDIR_INIT\(.*\)|AC_COIN_PROJECTDIR_INIT\($new_current:$new_revision:$new_age\)|" $i > bla
507  mv bla $i
508  svn di $i
509done
510
511# Now fix up the Dependencies file, if it exists. References to stable branches
512# will be converted to references to releases unless the reference is to a
513# project in the stableExternals list. Each line in a Dependencies file has the
514# format <ext_name> <ext_url>. The reference must be to a stable branch.
515
516if test -r Dependencies; then
517
518  echo ''
519  echo '===> Checking externals for releases and buildtools version...'
520  echo ''
521
522  buildtools_stable=`svn pget svn:externals $stableURL | grep -e "BuildTools/releases" | sed -e 's|.*/releases/\([0-9]*.[0-9]*\).[0-9]*|\1|'`
523
524  echo "$stableProj uses build tools stable version $buildtools_stable"
525  echo ''
526
527  rm -f Externals
528  ext_name=
529  ext_url=
530  for i in `cat Dependencies`; do
531    if test "$ext_name" = ""; then
532      ext_name="$i"
533    else
534      echo "Now checking $ext_name..."
535      echo ''
536      ext_url=$i
537      if (echo $ext_name | grep -E '^#' >/dev/null); then
538        echo "===> Skip $ext_name $ext_url."
539        ext_name=
540        continue
541      fi                                   
542      if (echo $ext_url | grep -E 'stable/|releases/' >/dev/null); then
543        :;
544      else
545        echo ''
546        echo "===> The external URL $ext_url is not a stable branch or release. Exiting."
547        echo ''
548        exit -2
549      fi
550
551#      buildtools_version=`svn pget svn:externals $ext_url | grep -e "BuildTools/releases" | sed -e 's|.*/releases/\([0-9]*.[0-9]*\).[0-9]*|\1|'`
552      ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9]*.[0-9]*/\).*|\1|'`
553      buildtools_version=`svn pget svn:externals $ext_stable | grep -e "BuildTools/stable" | sed -e 's|.*/stable/\([0-9]*.[0-9]*\)|\1|'`
554
555      if test "$buildtools_stable" = "$buildtools_version"; then
556        echo '===> Build tools consistency check OK'
557      elif test "$buildtools_version" = ""; then
558        echo "===> Skipping build tools version check for $ext_name"
559      else
560        echo $ext_name >>problems.ext
561      fi
562
563      if test -r problems.ext; then
564        echo ''
565        echo 'PROBLEM DURING CONSISTENCY CHECK:'
566        echo ''
567        echo ''
568        echo "External $ext_name uses stable version $buildtools_version of the build tools"
569        echo "$stableProj uses stable version $buildtools_stable of the build tools"
570        echo ''
571        cat problems.ext
572        echo ''
573        rm -f problems.ext
574        if test $ignoreBuildToolsMismatch = 0 ; then
575           exit -2
576        else
577          echo "Continuing in spite of BuildTools mismatch."
578        fi
579      fi
580
581      ext_base_front=`echo $ext_url | sed -e 's|/stable/.*||'`
582      ext_proj=`echo $ext_base_front | sed -e 's|.*/\([^/]*\)|\1|'`
583
584      if expr "$stableExternals" : '.*'"$ext_proj"'.*' 2>&1 >/dev/null ; then
585        echo "===> Using stable reference for $ext_name."
586        ext_rel_url=$ext_url
587      elif expr "$ext_url" : '.*releases/.*' 2>&1 >/dev/null ; then
588        echo "===> Using specified release for $ext_name."
589        ext_rel_url=$ext_url
590      else
591        ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9\.]*\).*|\1|'`
592        ext_base_end=`echo $ext_url | sed -e 's|.*/stable/[0-9\.]*||'`
593        ext_stable_branch=`echo $ext_stable | sed -e 's|.*/stable/||'`
594
595        echo "===> Determining release replacement for $ext_name:"
596        ext_latest=$ext_stable_branch.`determine_revision $ext_stable 0`
597
598        if test "$ext_base_end" = ""; then
599          ext_rel_url=$ext_base_front/releases/$ext_latest
600        else
601          ext_rel_url=$ext_base_front/releases/$ext_latest$ext_base_end
602        fi
603      fi
604
605      echo "     $ext_rel_url"
606      echo "$ext_name  $ext_rel_url" >>Externals
607      ext_name=
608      echo ''
609    fi
610  done
611
612  echo ''
613  echo '===> Updating svn:externals properties, and checking out externals...'
614  echo ''
615
616  svn pset svn:externals -F Externals .
617
618  svn update
619
620  echo ''
621  echo '===> If there are ThirdParty externals, run the download scripts...'
622  echo ''
623
624  ext_name=
625  ext_url=
626  for i in `cat Externals`; do
627    if test "$ext_name" = ""; then
628      ext_name="$i"
629    else
630      ext_url=$i
631
632      case $ext_name in
633        ThirdParty/*)
634          pkg=`echo $ext_name | sed -e 's|ThirdParty/||' -e 's|/||g'`
635          getfile=get.$pkg
636          if test -r $ext_name/$getfile; then
637            curdir=`pwd`
638            cd $ext_name
639            echo "Running $getfile -patch in `pwd`"
640            eval ./$getfile -patch
641            cd "$curdir"
642          fi
643          ;;
644      esac
645      ext_name=
646    fi
647  done
648fi # if test -r Externals
649
650if test $isThirdParty = yes; then
651  pkg=`echo $baseURL | sed -e 's|.*/||g'`
652  if test -r get.$pkg; then
653    echo ''
654    echo '===> Download third party code...'
655    echo ''
656    ./get.$pkg
657  fi
658fi
659
660echo ''
661echo '===> Running the autotools...'
662echo ''
663
664if test $isThirdParty = yes; then
665  curdir=`pwd`
666  cd ../..
667  BuildTools/run_autotools
668  cd "$curdir"
669elif test $isData = yes; then
670  curdir=`pwd`
671  cd ../..
672  BuildTools/run_autotools
673  cd "$curdir"
674else
675  BuildTools/run_autotools
676fi
677
678if test $isThirdParty != yes && test $isData != yes; then
679  (set -e
680   echo ''
681   echo '===> Creating build directory and running the configuration script...'
682   echo ''
683   mkdir build
684   cd build
685   cmd="$coDir/configure -C --enable-maintainer-mode"
686   echo $cmd
687   eval $cmd
688   echo ''
689   echo '===> Compiling code...'
690   echo ''
691   cmd='make install'
692   echo $cmd
693   eval $cmd
694   echo ''
695   echo '===> Running the unit test...'
696   echo ''
697   echo '*******************************************************************************'
698   echo '***                                                                         ***'
699   echo '***                       BEGIN OUTPUT OF MAKE TEST                         ***'
700   echo '***                                                                         ***'
701   echo '*******************************************************************************'
702   echo ''
703   cmd='make test'
704   echo $cmd
705   eval $cmd
706   echo ''
707   echo '*******************************************************************************'
708   echo '***                                                                         ***'
709   echo '***                        END OUTPUT OF MAKE TEST                          ***'
710   echo '***                                                                         ***'
711   echo '*******************************************************************************'
712  )
713  if test $? != 0; then
714    echo ''
715    echo 'Error during build or test'
716    echo ''
717    exit -3
718  fi
719fi
720
721echo ''
722echo '===> ALL TESTS PASSED'
723if test $isThirdParty != yes && test $isData != yes; then
724  echo ''
725  echo 'Please review the output above, particularly the one of make test'
726fi
727
728# Do we need to plug in nonexistent releases for circular dependencies tested
729# with the stable versions? If so, generate a new Externals.release. This is
730# the only reason stable references should appear in the Externals file for a
731# release, so we don't need to check further before removing them.
732
733if test -n "$stableExternals" ; then
734  echo "Grooming Externals to remove stable references used for testing."
735  rm -rf Externals.releases
736  ext_name=
737  ext_url=
738  for i in `cat Externals`; do
739    if test "$ext_name" = ""; then
740      ext_name="$i"
741    else
742      ext_url=$i
743      if (echo $ext_url | grep -E 'stable/' >/dev/null); then
744        echo "Determining release replacement for $ext_name:"
745        ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9\.]*\).*|\1|'`
746        ext_latest=`determine_release $ext_stable 1`
747        ext_rel_url=`echo $ext_url | sed -e "s|stable/[0-9.]*|releases/$ext_latest|"`
748        echo "  $ext_rel_url"
749      else
750        ext_rel_url=$ext_url
751      fi
752      echo "$ext_name  $ext_rel_url" >>Externals.releases
753      ext_name=
754    fi
755  done
756  mv Externals.releases Externals
757  svn propset -F Externals svn:externals .
758fi
759
760
761if test -r Externals; then
762  echo ''
763  echo 'Also, please confirm the Externals are correct:'
764  svn propget svn:externals
765fi
766
767echo ''
768echo 'After reviewing the output above, you can create a new release by going into'
769echo 'the directory'
770echo ''
771echo "          $coDir"
772echo ''
773echo "and run the commit_new_release script"
774
775rm -rf Externals
776
777cat >.new_release_data <<EOF
778isData=$isData
779coDir=$coDir
780buildBase=$buildBase
781releaseURL=$releaseURL
782stableURL=$stableURL
783new_ver=$new_ver
784stableBranch=$stableBranch
785EOF
Note: See TracBrowser for help on using the repository browser.