source: stable/0.5/commit_new_release @ 799

Last change on this file since 799 was 799, checked in by andreasw, 12 years ago

synchronized BuildTools?/stable/0.5 with trunk rev 798

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.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 Common Public License.
6# It is part of the BuildTools project in COIN-OR (www.coin-or.org)
7#
8## $Id: commit_new_release 799 2007-12-04 21:06:00Z andreasw $
9#
10# Author: Andreas Waechter     IBM      2007-06-21
11
12#set -x -v
13
14set -e
15
16if test -r .new_release_data; then
17  . .new_release_data
18else
19  echo ''
20  echo 'Error: You need to run prepare_new_release first.'
21  echo ''
22  exit -1;
23fi
24
25echo ''
26echo '===> Temporarily committing changed version of stable...'
27echo ''
28
29rev_num_before=`svn info . | grep -E '^Revision:' | sed -e 's|Revision: ||'`
30echo "Revision number before commit: $rev_num_before"
31
32cmd="svn ci -m \"temporarily committing release candidate to stable\""
33echo $cmd
34eval $cmd
35
36cmd='svn update'
37echo $cmd
38eval $cmd
39
40rev_num=`svn info . | grep -E '^Revision:' | sed -e 's|Revision: ||'`
41echo "Current revision number is: $rev_num"
42
43echo ''
44echo "===> Creating new release $new_ver from stable $stable_branch (rev $rev_num)..."
45echo ''
46
47new_rel_url=$base_url/releases/$new_ver
48cmd="svn copy -m \"creating releases/$new_ver from stable/$stable_branch (rev $rev_num)\" $stable_url $new_rel_url"
49echo $cmd
50eval $cmd
51
52if test -r Externals; then
53  echo ''
54  echo '===> Restoring original externals...'
55  echo ''
56
57  mv Externals.bak Externals
58  svn pset svn:externals -F Externals .
59fi
60
61conf_ac_files=`find . -name 'configure.ac' | grep -v -E 'ThirdParty/.*/.*/configure.ac'`
62
63echo ''
64echo "===> Restoring version number (${stable_branch}stable) in configure.ac files"
65for i in $conf_ac_files; do
66  sed -e "s|AC_INIT\(.*\)\[[0-9\.]*\],\(.*\)|AC_INIT\1[${stable_branch}stable],\2|" $i > bla
67  mv bla $i
68  svn di $i
69done
70
71echo ''
72echo '===> Running the autotools'
73echo ''
74curdir=`pwd`
75cd $tmpbas
76BuildTools/run_autotools
77cd "$curdir"
78
79echo ''
80echo '===> Committing restored stable...'
81echo ''
82
83cmd="svn ci -m \"restoring stable/$stable_branch\""
84echo $cmd
85eval $cmd
86
87echo ''
88echo "Done, new release $new_rel_url created"
89echo ''
90echo "You can now delete the directory $tmpbas including subdirectories"
91
92rm .new_release_data
Note: See TracBrowser for help on using the repository browser.