Changeset 1236
- Timestamp:
- Feb 21, 2009 2:17:22 PM (12 years ago)
- Location:
- stable/0.5
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
stable/0.5/coin.m4
r1112 r1236 527 527 # AC_MSG_NOTICE([C++ compiler candidates: $comps]) 528 528 AC_PROG_CXX([$comps]) 529 if test -z "$CXX" ; then 530 AC_MSG_ERROR([Failed to find a C++ compiler!]) 531 fi 529 530 #AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler 531 #thus, we test here whether $CXX is actually working 532 AC_LANG_PUSH(C++) 533 AC_MSG_CHECKING([whether C++ compiler $CXX works]); 534 AC_COMPILE_IFELSE( 535 [AC_LANG_PROGRAM(, [int i=0;])], 536 [AC_MSG_RESULT(yes)], 537 [AC_MSG_RESULT(no) 538 AC_MSG_ERROR(failed to find a C++ compiler or C++ compiler $CXX does not work)] 539 ) 540 AC_LANG_POP(C++) 532 541 533 542 # It seems that we need to cleanup something here for the Windows … … 3094 3103 #check if user provides a MUMPS library (that works) 3095 3104 AC_LANG_PUSH(C) 3105 SAVE_ADDLIBS="$ADDLIBS" 3106 ADDLIBS="$ADDLIBS $FLIBS" 3096 3107 AC_COIN_HAS_USER_LIBRARY(mumps, MUMPS, dmumps_c.h, dmumps_c) 3108 ADDLIBS="$SAVE_ADDLIBS" 3097 3109 AC_LANG_POP(C) 3098 3110 -
stable/0.5/commit_new_release
r799 r1236 9 9 # 10 10 # Author: Andreas Waechter IBM 2007-06-21 11 # Modified by: Lou Hafer SFU 2008-04-17 11 12 12 13 #set -x -v 13 14 14 15 set -e 16 17 # Remember what was done during release generation. 15 18 16 19 if test -r .new_release_data; then … … 22 25 exit -1; 23 26 fi 27 28 # Commit the release to stable so we can do a repository-side copy to create 29 # the release. 24 30 25 31 echo '' … … 34 40 eval $cmd 35 41 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 51 cmd='svn update --ignore-externals' 37 52 echo $cmd 38 53 eval $cmd … … 41 56 echo "Current revision number is: $rev_num" 42 57 58 # Create the release with a repository-side copy. 59 43 60 echo '' 44 echo "===> Creating new release $new_ver from stable $stable _branch (rev $rev_num)..."61 echo "===> Creating new release $new_ver from stable $stableBranch (rev $rev_num)..." 45 62 echo '' 46 63 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" 64 cmd="svn copy -m \"creating releases/$new_ver from stable/$stableBranch (rev $rev_num)\" $stableURL $releaseURL" 49 65 echo $cmd 50 66 eval $cmd 67 68 # And restore the stable branch to it's original condition. Start by reverting 69 # to the original externals. 51 70 52 71 if test -r Externals; then … … 59 78 fi 60 79 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 88 conf_ac_files=`find . -name 'configure.ac' | grep -v -E '.*/.*/configure.ac'` 62 89 63 90 echo '' 64 echo "===> Restoring version number (${stable _branch}stable) in configure.ac files"91 echo "===> Restoring version number (${stableBranch}stable) in configure.ac files" 65 92 for i in $conf_ac_files; do 66 sed -e "s|AC_INIT\(.*\)\[[0-9\.]*\],\(.*\)|AC_INIT\1[${stable _branch}stable],\2|" $i > bla93 sed -e "s|AC_INIT\(.*\)\[[0-9\.]*\],\(.*\)|AC_INIT\1[${stableBranch}stable],\2|" $i > bla 67 94 mv bla $i 68 95 svn di $i … … 73 100 echo '' 74 101 curdir=`pwd` 75 cd $ tmpbas102 cd $buildBase 76 103 BuildTools/run_autotools 77 104 cd "$curdir" 105 106 # Commit the restored stable branch. 78 107 79 108 echo '' … … 81 110 echo '' 82 111 83 cmd="svn ci -m \"restoring stable/$stable _branch\""112 cmd="svn ci -m \"restoring stable/$stableBranch\"" 84 113 echo $cmd 85 114 eval $cmd 86 115 87 116 echo '' 88 echo "Done, new release $ new_rel_urlcreated"117 echo "Done, new release $releaseURL created" 89 118 echo '' 90 echo "You can now delete the directory $ tmpbasincluding subdirectories"119 echo "You can now delete the directory $buildBase including subdirectories" 91 120 92 121 rm .new_release_data -
stable/0.5/headers/configall_system.h
- Property svn:eol-style set to native
- Property svn:keywords set to Author Date Id Revision
-
stable/0.5/headers/configall_system_msc.h
- Property svn:eol-style set to native
- Property svn:keywords set to Author Date Id Revision
-
stable/0.5/prepare_new_release
r1024 r1236 9 9 # 10 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. 11 14 12 15 #set -x -v 13 14 16 set -e 15 echo '' 17 18 # You can think of this script as having three sections: first, the following 19 # function definition, then parameter parsing and validation, and finally the 20 # actual generation of the release candidate. See the help message for a good 21 # description of the actions taken to generate the release candidate. 22 23 # Utility function to determine current or next release for a given stable 24 # branch. Call is determine_release(stableURL,next). Replace next with 1 for 25 # the next release, 0 for the current release. This code is needed in three 26 # separate places, so it really deserves to be a function. We can hope that 27 # maintainers will have a reasonably modern version of standard sh. 28 29 # Data is a real pain in the **** and should be converted to the standard 30 # nomenclature. 31 32 determine_release () 33 { 34 if test $isData = no ; then 35 36 drtmp_stableBranch=`echo $1 | sed -e 's|.*/stable/||'` 37 drtmp_baseURL=`echo $1 | sed -e 's|/stable/[0-9.]*||'` 38 drtmp_returnVal= 39 40 # List the existing releases and screen for releases matching stableBranch. 41 42 drtmp_svnlst=`svn list $drtmp_baseURL/releases/` 43 44 drtmp_release_vers= 45 for drtmp_i in $drtmp_svnlst ; do 46 case $drtmp_i in 47 $drtmp_stableBranch.*) 48 drtmp_i=`echo $drtmp_i | sed -e 's|/$||'` 49 drtmp_release_vers="$drtmp_release_vers $drtmp_i";; 50 esac; 51 done 52 53 # Are there any existing releases? If not, and the user didn't ask for the 54 # next release, we have an error. 55 56 if test -z "$drtmp_release_vers" ; then 57 if test $2 = 1 ; then 58 drtmp_returnVal="$drtmp_stableBranch.0" 59 else 60 drtmp_returnVal="Error" 61 fi 62 else 63 64 # There are releases. If we don't have one after the loop, we're confused. 65 66 drtmp_new_rel=-10000 67 for drtmp_i in $drtmp_release_vers; do 68 drtmp_rel=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"` 69 if test $drtmp_rel -gt $drtmp_new_rel; then 70 drtmp_new_rel=$drtmp_rel 71 fi 72 done 73 74 if test $drtmp_new_rel = -10000; then 75 drtmp_new_rel="Error" 76 elif test $2 = 1 ; then 77 drtmp_new_rel=`expr $drtmp_new_rel + 1` 78 fi 79 drtmp_returnVal="$drtmp_stableBranch.$drtmp_new_rel" 80 fi 81 82 else # end normal and ThirdParty, begin Data 83 84 drtmp_stableBranch=`echo $1 | sed -e 's|.*/stable/\([0-9.]*\)/.*|\1|'` 85 drtmp_baseURL=`echo $1 | sed -e 's|\(.*\)/stable/[0-9.]*/.*|\1|'` 86 drtmp_proj=`echo $1 | sed -e 's|.*/stable/[0-9.]*/||` 87 88 # Screen for releases that match the stable branch and contain the project 89 # of interest. First, check for releases that match the stable branch. If 90 # there are none, we're release 0 for this stable branch. It's an error if 91 # there are no releases and the user did not ask for the next release. Sort 92 # by release number here, while we have newlines in the list from svn. 93 94 drtmp_svnlst=`svn list $drtmp_baseURL/releases | sort -nr -t. -k3,3` 95 96 drtmp_release_vers= 97 for drtmp_i in $drtmp_svnlst ; do 98 case $drtmp_i in 99 $drtmp_stableBranch.*) 100 drtmp_i=`echo $drtmp_i | sed -e 's|/$||'` 101 drtmp_release_vers="$drtmp_release_vers $drtmp_i";; 102 esac; 103 done 104 105 # Do we have releases that match the stable branch? 106 107 if test -z "$drtmp_release_vers" ; then 108 if test $2 = 1 ; then 109 drtmp_returnVal="$drtmp_stableBranch.0" 110 else 111 drtmp_returnVal="Error" 112 fi 113 else 114 115 # Releases exist that match stable; do any contain our project? Because 116 # we presorted by release, we can break here at the first success. 117 118 drtmp_svnlst=`echo $drtmp_release_vers` 119 drtmp_release_vers= 120 for drtmp_i in $drtmp_svnlst ; do 121 case $drtmp_i in 122 $drtmp_stableBranch.*) 123 drtmp_i=`echo $drtmp_i | sed -e 's|/$||'` 124 drtmp_projlst=`2>&1 svn list $drtmp_baseURL/releases/$drtmp_i/$drtmp_proj` 125 if expr "$drtmp_projlst" : '.*non-existent.*' 2>&1 >/dev/null ; then 126 : 127 else 128 drtmp_release_vers="$drtmp_i" 129 break 130 fi 131 ;; 132 esac; 133 done 134 135 # Are there any existing releases? If no, and the user didn't ask for 136 # the next release, it's an error. Otherwise, go for release 0 of 137 # proj in the current stable branch. If there are existing releases, 138 # return either the current or +1. 139 140 if test -z "$drtmp_release_vers" ; then 141 if test $2 = 0 ; then 142 drtmp_returnVal="$drtmp_stableBranch.Error" 143 else 144 drtmp_returnVal="$drtmp_stableBranch.0" 145 fi 146 else 147 drtmp_new_rel=-10000 148 for drtmp_i in $drtmp_release_vers; do 149 drtmp_rel=`echo $drtmp_i | sed -e "s|^$drtmp_stableBranch.||"` 150 if test $drtmp_rel -gt $drtmp_new_rel; then 151 drtmp_new_rel=$drtmp_rel 152 fi 153 done 154 drtmp_new_rel=`expr $drtmp_new_rel + 1` 155 drtmp_returnVal="$drtmp_stableBranch.$drtmp_new_rel" 156 fi 157 158 fi # for releases matching stable branch 159 160 fi # for normal/Data 161 162 echo $drtmp_returnVal 163 } 164 165 166 # Specify the COIN URL base for convenience. 167 168 coinURL="https://projects.coin-or.org/svn" 169 170 # Begin parameter processing. 171 172 printHelp=0 173 exitValue=0 174 ignoreBuildToolsMismatch=0 175 176 # stableURL will be the stable branch that is the parent for the release we 177 # are building. We'll need to be able to distinguish ThirdParty and Data 178 # builds; they require special handling. 179 # buildToolsURL is required when stableURL specifies a ThirdParty or Data 180 # project --- we'll need to assemble a temporary package while creating the 181 # release candidate. 182 183 stableURL= 184 isThirdParty=no 185 isData=no 186 buildToolsURL= 187 188 # stableExternals, on the other hand, specifies externals for which we are 189 # doing simultaneous releases. We will use the stable branch of the external 190 # while preparing and testing this release candidate, changing the Externals 191 # file to specify a (nonexistent) release of the external at the last moment. 192 193 stableExternals= 194 195 # We need at least one parameter. 16 196 17 197 if test "$#" -eq 0; then 198 printHelp=1 199 else 200 201 # Process the parameters. A parameter without an opening `-' is assumed to be 202 # the spec for the stable branch. 203 204 while test $# -gt 0 && test $exitValue = 0 && test $printHelp = 0 ; do 205 case "$1" in 206 -h* | --h*) printHelp=1 ;; 207 -i* | --i*) ignoreBuildToolsMismatch=1 ;; 208 -s* | --s*) 209 if expr "$1" : '.*-s.*=.*' 2>&1 >/dev/null ; then 210 stableExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'` 211 else 212 shift 213 stableExternals=$1 214 fi 215 ;; 216 -b* | --b*) 217 if expr "$1" : '.*-b.*=.*' 2>&1 >/dev/null ; then 218 buildToolsURL=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'` 219 else 220 shift 221 buildToolsURL=$1 222 fi 223 if expr "$buildToolsURL" : '.*BuildTools.*' 2>&1 >/dev/null ; then 224 case $buildToolsURL in 225 http*) ;; 226 *) buildToolsURL=${coinURL}/$buildToolsURL 227 ;; 228 esac 229 else 230 echo '' 231 echo "URL $buildToolsURL does not point to BuildTools." 232 echo '' 233 printHelp=1 234 exitValue=-3 235 fi 236 ;; 237 238 -*) echo "$0: unrecognised command line switch '"$1"'." 239 printHelp=1 240 exitValue=-1 241 ;; 242 *) stableURL=$1 243 if expr "$stableURL" : '.*/stable/.*' 2>&1 >/dev/null ; then 244 case $stableURL in 245 http*) ;; 246 *) stableURL=${coinURL}/$stableURL 247 ;; 248 esac 249 else 250 echo '' 251 echo "URL $stableURL does not specify a stable release." 252 echo '' 253 printHelp=1 254 exitValue=-2 255 fi 256 ;; 257 esac 258 shift 259 done 260 261 # Consistency checks: Make sure that the stable URL exists. If we're building 262 # a ThirdParty or Data release, we need a BuildTools URL. 263 264 if test $printHelp = 0 && test $exitValue = 0 ; then 265 if svn list $stableURL 2>&1 >/dev/null ; then 266 : 267 else 268 echo "Stable URL $stableURL does not seem to exist." 269 printHelp=1 270 exitValue=-5 271 fi 272 fi 273 if test $printHelp = 0 && test $exitValue = 0 ; then 274 case $stableURL in 275 *ThirdParty/* ) 276 isThirdParty=yes 277 ;; 278 *Data/* ) 279 isData=yes 280 ;; 281 *) 282 ;; 283 esac 284 if test $isThirdParty = yes || test $isData = yes ; then 285 if test -z $buildToolsURL ; then 286 echo "You must provide a BuildTools URL to build a ThirdParty or Data project." 287 printHelp=1 288 exitValue=-4 289 else 290 if svn list $buildToolsURL 2>&1 >/dev/null ; then 291 : 292 else 293 echo "BuildTools URL $buildToolsURL does not seem to exist." 294 printHelp=1 295 exitValue=-6 296 fi 297 fi 298 fi 299 fi 300 fi 301 302 if test $printHelp = 1 ; then 18 303 cat <<EOF 19 Usage: prepare_new_release stable_repos 20 21 stable_repos is the URL for the stable branch of your project, for which 22 you want to create a new release. You can specify the entire URL, or you 23 just enter what comes after "https://projects.coin-or.org/svn". A typical 24 example is 304 Usage: prepare_new_release <stableBranch> [options] 305 306 COIN standard practice is to generate periodic releases by taking a snapshot 307 of the stable branch of the project. You can use this script to prepare 308 a new release based on the specified stable branch. 309 310 Stable_branch specifies the stable branch of your project to be used to 311 create the new release. You can specify the entire URL, or you just enter 312 what comes after "https://projects.coin-or.org/svn". A typical example is 25 313 26 314 prepare_new_release Ipopt/stable/3.3 27 315 28 You can use this script to prepare a new release based on the specified 29 stable branch. 316 Options: 317 -b <BuildToolsURL> URL for BuildTools; required to generate a release 318 for a ThirdParty or Data project. 319 -s <projectlist> Comma-separated list of projects with circular 320 dependencies on this project. The stable branch of 321 projects in this list will be used while testing, on 322 the assumption that simultaneous releases will be 323 created as the release candidates are committed. 324 -i Ignore BuildTools version mismatches in externals. 30 325 31 326 This script will do the following: 32 327 33 - automatically determine the next release number 34 - check out a clean copy of the stable version specified 35 - update the externals to point to the latest releases in the dependencies 36 (for the same stable branch as specified in the Externals script) 37 - update the version number in your configure.ac files 38 - receive the code for the externals 39 - use the "get.*" scripts to download ThirdParty code (if there are any) 40 - rerun the autotools 41 - check if all dependencies are using the same version of the BuildTools 42 - run the configure script and compile the code 43 - run the unit test 328 - Automatically determine the next release number (X.Y.0 if this is the 329 first release for stable/X.Y, otherwise one greater than any existing 330 release) 331 - Check out a clean copy of the specified stable branch, without externals 332 - Read the Externals file and create a new Externals file for the release 333 by converting references to stable branches to references to the most 334 recent release for that stable branch. 335 - Create a new package configure.ac file with the release version number 336 specified in the AC_INIT macro. 337 - Set the svn:externals property for the release package and check out the 338 code for the externals. 339 - Use the "get.*" scripts to download any ThirdParty code. 340 - Execute run_autotools to update configure, Makefile.in, etc., to reflect 341 the most recent release of BuildTools. 342 - Check that all dependencies are using the same version of the BuildTools 343 - Run the configure script, compile the code, and run the unit test. 344 - Replace any stable references in Externals (specified with -s) with the 345 appropriate (yet to be committed) release. 44 346 45 347 If there is any error during these tasks the script will stop and you should 46 348 examine the output. 47 349 48 If the script terminates successfully, you could have a look at the output,49 particularly at the output of the unit test ('make test') and the 50 chosen Externals.51 52 So far, no changes will have been madeto the repository. If you want to350 If the script completes without error, examine the output, particularly the 351 output of the unit test ('make test') and the set of externals specified in 352 the Externals file. 353 354 This script does not make any changes to the repository. If you want to 53 355 commit the new release, run the "commit_new_release" script, as described 54 356 at the end of the output. 55 357 56 358 EOF 57 exit 0 58 fi 59 60 stable_url=$1 61 if (echo $stable_url | grep -E 'stable/' >/dev/null); then :; else 62 echo '' 63 echo 'This URL is not for a stable release. Exiting.' 64 echo '' 65 exit -2 66 fi 67 68 case $stable_url in 69 http*) ;; 70 *) 71 stable_url=https://projects.coin-or.org/svn/$stable_url 72 ;; 73 esac 74 75 base_url=`echo $stable_url | sed -e 's|/stable/[0-9\.]*||'` 76 echo "Base URL..........: $base_url" 77 echo "Stable URL........: $stable_url" 78 stable_branch=`echo $stable_url | sed -e 's|.*/stable/]*||'` 79 echo "Stable branch.....: $stable_branch" 80 81 # finding out which releases already exist for that stable branch 82 echo '' 83 echo '===> Checking for current releases for this branch...' 84 tmp=`svn list $base_url/releases/` 85 release_vers= 86 for i in $tmp; do 87 i=`echo $i | sed -e 's|/||g'` 88 case $i in 89 $stable_branch.*) release_vers="$release_vers $i";; 90 esac; 91 done 92 93 # Determine latest release number 94 new_rel=-10000 95 for i in $release_vers; do 96 echo " $i" 97 rel=`echo $i | sed -e "s|^$stable_branch.||"` 98 if test $rel -gt $new_rel; then 99 new_rel=$rel 100 fi 101 done 102 103 if test $new_rel = -10000; then 104 new_rel=0 105 elif test $new_rel = 0; then 106 new_rel=1 359 fi 360 361 if test $exitValue != 0 || test $printHelp = 1 ; then 362 exit $exitValue 363 fi 364 365 # End of parameter parsing. We have a stable URL to work with. Tell the 366 # user what we've seen. 367 368 stableURL=`echo $stableURL | sed -e 's|/$||'` 369 if test $isData = yes ; then 370 stableProj=`echo $stableURL | sed -n -e 's|.*/[^/]*/stable/[0-9.]*/\(.*\)|\1|p'` 371 baseURL=`echo $stableURL | sed -e 's|\(.*\)/stable/[0-9.]*/\(.*\)|\1/_BB_/_RR_/\2|'` 372 stableBranch=`echo $stableURL | sed -e 's|.*/stable/\([0-9.]*\)/.*|\1|'` 107 373 else 108 new_rel=`(expr $new_rel + 1)` 109 fi 110 new_ver="$stable_branch.$new_rel" 374 stableProj=`echo $stableURL | sed -n -e 's|.*/\([^/]*\)/stable/.*|\1|p'` 375 baseURL=`echo $stableURL | sed -e 's|/stable/[0-9.]*||'` 376 stableBranch=`echo $stableURL | sed -e 's|.*/stable/||'` 377 fi 378 echo "StableProj: $stableProj" 379 echo "Base URL..........: $baseURL" 380 echo "Stable URL........: $stableURL" 381 echo "Stable branch.....: $stableBranch" 382 if test -n "$stableExternals" ; then 383 echo "Stable externals..: $stableExternals." 384 fi 385 386 # Find out the most recent release (if any) for the stable branch. List the 387 # existing releases and screen for releases matching stableBranch. The new 388 # release should be one greater than any existing release, or 0 if the stable 389 # branch has no releases. 390 391 echo '' 392 echo "===> Checking releases for stable branch $stableBranch ..." 393 394 new_ver=`determine_release "$stableURL" 1` 111 395 112 396 echo '' 113 397 echo "New release.......: $new_ver" 114 115 echo '' 116 echo "===> Checking out stable release $stable_branch without externals..." 117 echo '' 118 119 case $base_url in 120 *ThirdParty/* ) 121 is_thirdparty=yes 122 is_data=no 123 ;; 124 *Data ) 125 is_thirdparty=no 126 is_data=yes 127 ;; 128 *) 129 is_thirdparty=no 130 is_data=no 131 ;; 132 esac 133 134 if test $is_thirdparty = yes || test $is_data = yes; then 135 buildtoolsurl=$2 136 if test "$buildtoolsurl" == ""; then 137 echo '' 138 echo 'For a ThirdParty project you need to provide a URL for BuildTools' 139 echo 'as second argument. Exiting.' 140 echo '' 141 exit -3 142 fi 143 case $buildtoolsurl in 144 http*) ;; 145 *) 146 buildtoolsurl=https://projects.coin-or.org/svn/$buildtoolsurl 147 ;; 148 esac 149 fi 150 151 tmpbas=tmp_checkout 152 if test $is_thirdparty = yes; then 153 tmpcodir=$tmpbas/a/b 154 elif test $is_data = yes; then 155 tmpcodir=$tmpbas/a 398 buildBase="${stableProj}-$new_ver" 399 echo "Build directory...: $buildBase" 400 if test $isData = yes ; then 401 releaseURL=`echo $baseURL | sed -e s/_BB_/releases/ -e s/_RR_/$new_ver/` 156 402 else 157 tmpcodir=$tmpbas 158 fi 159 160 rm -rf $tmpbas 161 cmd="svn co --ignore-externals $stable_url $tmpcodir" 403 releaseURL="$baseURL/releases/$new_ver" 404 fi 405 echo "Release URL.......: $releaseURL" 406 407 # Check out the stable branch that'll be the base of the new release. No 408 # externals at this point. Creating a release of a ThirdParty or Data project 409 # requires a bit of work, as we need to assemble a temporary package with a 410 # BuildTools external. 411 412 echo '' 413 echo "===> Checking out stable release $stableBranch without externals..." 414 echo '' 415 416 if test $isThirdParty = yes; then 417 coDir=$buildBase/a/b 418 elif test $isData = yes; then 419 coDir=$buildBase/a/b 420 else 421 coDir=$buildBase 422 fi 423 echo "Checkout directory: $coDir" 424 425 rm -rf $buildBase 426 cmd="svn co --ignore-externals $stableURL $coDir" 162 427 echo $cmd 163 428 eval $cmd 164 429 165 if test $is _thirdparty = yes || test $is_data = yes; then430 if test $isThirdParty = yes || test $isData = yes; then 166 431 echo '' 167 432 echo '===> Checking out BuildTools for ThirdParty project...' 168 433 echo '' 169 cmd="svn co $build toolsurl $tmpbas/BuildTools"434 cmd="svn co $buildToolsURL $buildBase/BuildTools" 170 435 echo $cmd 171 436 eval $cmd 172 437 fi 173 438 174 tmpcodir=`cd $tmpcodir; pwd` 175 tmpbas=`cd $tmpbas; pwd` 176 177 cd $tmpcodir 439 coDir=`cd $coDir; pwd` 440 buildBase=`cd $buildBase; pwd` 441 442 cd $coDir 443 444 # Find configure.ac files for the package and project and update the version. 445 # We have no externals at this point, so there will be two files for a 446 # standard project, one for a ThirdParty project, and none for a Data project. 178 447 179 448 echo '' … … 191 460 svn di $i 192 461 done 462 463 # Now fix up the Externals file, if it exists. References to stable branches 464 # will be converted to references to releases unless the reference is to a 465 # project in the stableExternals list. Each line in an Externals file has the 466 # format <ext_name> <ext_url>. The reference must be to a stable branch. 193 467 194 468 if test -r Externals; then … … 206 480 else 207 481 ext_url=$i 208 if (echo $ext_url | grep -E 'stable/' >/dev/null); then :; else 482 if (echo $ext_name | grep -E '^#' >/dev/null); then 483 echo "Skip $ext_name $ext_url." 484 ext_name= 485 continue 486 fi 487 if (echo $ext_url | grep -E 'stable/|releases/' >/dev/null); then 488 :; 489 else 209 490 echo '' 210 echo "The external URL $ext_url is not for a stable branch. Exiting."491 echo "The external URL $ext_url is not a stable branch or release. Exiting." 211 492 echo '' 212 493 exit -2 213 494 fi 214 495 215 496 ext_base_front=`echo $ext_url | sed -e 's|/stable/.*||'` 216 ext_base_end=`echo $ext_url | sed -e 's|.*/stable/[0-9\.]*||'` 217 ext_stable_branch=`echo $ext_url | sed -e 's|.*/stable/]*||' -e s"|$ext_base_end||"` 218 219 echo "Determining release replacement for $ext_name:" 220 tmp=`svn list $ext_base_front/releases/` 221 ext_release_vers= 222 for i in $tmp; do 223 i=`echo $i | sed -e 's|/||g'` 224 case $i in 225 $ext_stable_branch.*) ext_release_vers="$ext_release_vers $i";; 226 esac; 227 done 228 # Determine latest release number 229 ext_latest=-10000 230 for i in $ext_release_vers; do 231 rel=`echo $i | sed -e "s|^$ext_stable_branch.||"` 232 if test $rel -gt $ext_latest; then 233 ext_latest=$rel 234 fi 235 done 236 if test $ext_latest = -10000; then 237 echo '' 238 echo "Error: No release for $ext_name for its stable defined in External" 239 echo '' 240 exit -5 241 fi 242 243 if test "$ext_base_end" = ""; then 244 ext_rel_url=$ext_base_front/releases/$ext_stable_branch.$ext_latest 497 ext_proj=`echo $ext_base_front | sed -e 's|.*/\([^/]*\)|\1|'` 498 499 if expr "$stableExternals" : '.*'"$ext_proj"'.*' 2>&1 >/dev/null ; then 500 echo "Using stable reference for $ext_name." 501 ext_rel_url=$ext_url 502 elif expr "$ext_url" : '.*releases/.*' 2>&1 >/dev/null ; then 503 echo "Using specified release for $ext_name." 504 ext_rel_url=$ext_url 245 505 else 246 ext_rel_url=$ext_base_front/releases/$ext_stable_branch.$ext_latest$ext_base_end 506 ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9\.]*\).*|\1|'` 507 ext_base_end=`echo $ext_url | sed -e 's|.*/stable/[0-9\.]*||'` 508 509 echo "Determining release replacement for $ext_name:" 510 ext_latest=`determine_release $ext_stable 0` 511 512 if test "$ext_base_end" = ""; then 513 ext_rel_url=$ext_base_front/releases/$ext_latest 514 else 515 ext_rel_url=$ext_base_front/releases/$ext_latest$ext_base_end 516 fi 247 517 fi 248 518 249 519 echo " $ext_rel_url" 250 echo "$ext_name $ext_rel_url" >> 520 echo "$ext_name $ext_rel_url" >>Externals.releases 251 521 ext_name= 252 522 fi 253 523 done 254 524 525 echo '' 255 526 echo '===> Creating backup (.bak) for Externals' 256 527 mv Externals Externals.bak … … 285 556 cd $ext_name 286 557 echo "Running $getfile -patch in `pwd`" 287 # mv $getfile $getfile.orig288 # sed -e 's+ftp://+http://+g' $getfile.orig > $getfile289 # chmod +x $getfile290 558 eval ./$getfile -patch 291 # mv $getfile.orig $getfile292 559 cd "$curdir" 293 560 fi … … 299 566 fi # if test -r Externals 300 567 301 if test $is _thirdparty = yes; then302 pkg=`echo $base _url| sed -e 's|.*/||g'`568 if test $isThirdParty = yes; then 569 pkg=`echo $baseURL | sed -e 's|.*/||g'` 303 570 if test -r get.$pkg; then 304 571 echo '' … … 313 580 echo '' 314 581 315 if test $is _thirdparty = yes; then582 if test $isThirdParty = yes; then 316 583 curdir=`pwd` 317 584 cd ../.. 318 585 BuildTools/run_autotools 319 586 cd "$curdir" 320 elif test $is _data = yes; then587 elif test $isData = yes; then 321 588 curdir=`pwd` 322 cd .. 589 cd ../.. 323 590 BuildTools/run_autotools 324 591 cd "$curdir" … … 357 624 if test -r problems.ext; then 358 625 echo '' 359 echo 'PROBLEM DURING CONSI TENCY CHECK:'626 echo 'PROBLEM DURING CONSISTENCY CHECK:' 360 627 echo '' 361 628 echo 'Please contact the project manager(s) for the following project(s).' … … 365 632 echo '' 366 633 rm -f problems.ext 367 exit -2 634 if test $ignoreBuildToolsMismatch = 0 ; then 635 exit -2 636 else 637 echo "Continuing in spite of BuildTools mismatch." 638 fi 368 639 fi 369 640 rm -f problems.ext 370 641 fi # if test -r Externals 371 642 372 if test $is _thirdparty != yes && test $is_data != yes; then643 if test $isThirdParty != yes && test $isData != yes; then 373 644 (set -e 374 645 echo '' … … 377 648 mkdir build 378 649 cd build 379 cmd="$ tmpcodir/configure -C --enable-maintainer-mode"650 cmd="$coDir/configure -C --enable-maintainer-mode" 380 651 echo $cmd 381 652 eval $cmd … … 415 686 echo '' 416 687 echo '===> ALL TESTS PASSED' 417 if test $is _thirdparty != yes && test $is_data != yes; then688 if test $isThirdParty != yes && test $isData != yes; then 418 689 echo '' 419 690 echo 'Please review the output above, particularly the one of make test' 420 691 fi 692 693 # Do we need to plug in nonexistent releases for circular dependencies tested 694 # with the stable versions? If so, generate a new Externals.release. This is 695 # the only reason stable references should appear in the Externals file for a 696 # release, so we don't need to check further before removing them. 697 698 if test -n "$stableExternals" ; then 699 echo "Grooming Externals to remove stable references used for testing." 700 rm -rf Externals.releases 701 ext_name= 702 ext_url= 703 for i in `cat Externals`; do 704 if test "$ext_name" = ""; then 705 ext_name="$i" 706 else 707 ext_url=$i 708 if (echo $ext_url | grep -E 'stable/' >/dev/null); then 709 echo "Determining release replacement for $ext_name:" 710 ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9\.]*\).*|\1|'` 711 ext_latest=`determine_release $ext_stable 1` 712 ext_rel_url=`echo $ext_url | sed -e "s|stable/[0-9.]*|releases/$ext_latest|"` 713 echo " $ext_rel_url" 714 else 715 ext_rel_url=$ext_url 716 fi 717 echo "$ext_name $ext_rel_url" >>Externals.releases 718 ext_name= 719 fi 720 done 721 mv Externals.releases Externals 722 svn propset -F Externals svn:externals . 723 fi 724 725 421 726 if test -r Externals; then 422 727 echo '' 423 echo 'Also, please c heck the Externals:'424 cat Externals728 echo 'Also, please confirm the Externals are correct:' 729 svn propget svn:externals 425 730 fi 426 731 … … 429 734 echo 'the directory' 430 735 echo '' 431 echo " $ tmpcodir"736 echo " $coDir" 432 737 echo '' 433 738 echo "and run the commit_new_release script" 434 739 435 740 cat >.new_release_data <<EOF 436 tmpcodir=$tmpcodir 437 tmpbas=$tmpbas 438 base_url=$base_url 439 stable_url=$stable_url 741 isData=$isData 742 coDir=$coDir 743 buildBase=$buildBase 744 releaseURL=$releaseURL 745 stableURL=$stableURL 440 746 new_ver=$new_ver 441 stable _branch=$stable_branch747 stableBranch=$stableBranch 442 748 EOF
Note: See TracChangeset
for help on using the changeset viewer.