source: trunk/commit_new_release @ 401

Last change on this file since 401 was 401, checked in by andreasw, 13 years ago

added scripts for making new releases

  • 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 401 2007-06-22 05:47:13Z 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'`
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 ''
74cd $tmpbas
75BuildTools/run_autotools
76cd - >/dev/null
77
78echo ''
79echo '===> Committing restored stable...'
80echo ''
81
82cmd="svn ci -m \"restoring stable/$stable_branch\""
83echo $cmd
84eval $cmd
85
86echo ''
87echo "Done, new release $new_rel_url created"
88echo ''
89echo "You can now delete the directory $tmpbas including subdirectories"
90
Note: See TracBrowser for help on using the repository browser.