Last change
on this file since 3405 was 758, checked in by Bruno Cornec, 18 years ago |
merge -r756:757 $SVN_M/branches/stable
|
-
Property svn:executable
set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # Prepare a delivery of a new version by changing VERSION/TAG from stable
|
---|
4 | #
|
---|
5 | # $Id$
|
---|
6 | #
|
---|
7 | # Syntax: mknewversion
|
---|
8 | #
|
---|
9 |
|
---|
10 | dname=`dirname $0`
|
---|
11 | prem=`echo $dname |cut -c1`
|
---|
12 | if [ ${prem} == "/" ]; then
|
---|
13 | export TOOLHOME=$dname
|
---|
14 | else
|
---|
15 | export TOOLHOME=${PWD}/$dname
|
---|
16 | fi
|
---|
17 |
|
---|
18 | . $TOOLHOME/common-env
|
---|
19 | . $TOOLHOME/distro-env
|
---|
20 |
|
---|
21 | # We need to get $VER
|
---|
22 | if [ "$1" = "" ]; then
|
---|
23 | LAST=`cat ${TOPDIR}/LAST`
|
---|
24 | else
|
---|
25 | LAST=$1
|
---|
26 | shift
|
---|
27 | fi
|
---|
28 | VER=`echo $LAST | cut -d- -f1`
|
---|
29 | MAJVER=`echo $VER | cut -d. -f1-2`
|
---|
30 | MINDIMAJVER=`echo $VER | cut -d. -f1`
|
---|
31 | MINDIMINVER=`echo $VER | cut -d. -f2`
|
---|
32 | ((MINDIMAJVER=$MINDIMAJVER-1))
|
---|
33 | MINVER=`echo $VER | cut -d. -f3`
|
---|
34 | TAG=1
|
---|
35 | ((MINVER=$MINVER+1))
|
---|
36 | VER=${MAJVER}.${MINVER}
|
---|
37 | echo "Changing Version $LAST to ${VER}-${TAG}"
|
---|
38 | grep -q stable $TOOLHOME/../mondo/VERSION
|
---|
39 | if [ $? -ne 0 ]; then
|
---|
40 | echo "A new version can only be made from stable"
|
---|
41 | exit -1
|
---|
42 | fi
|
---|
43 | nb=`svn diff $TOOLHOME/.. | wc -l`
|
---|
44 | if [ $nb -gt 0 ]; then
|
---|
45 | echo "You'll have to check in before changing version"
|
---|
46 | else
|
---|
47 | svn copy $SVN_M/branches/stable $SVN_M/branches/${VER}
|
---|
48 | cd $TOOLHOME/../..
|
---|
49 | svn co $SVN_M/branches/${VER} ${VER}
|
---|
50 | cd ${VER}
|
---|
51 | echo "$TAG" > tools/TAG
|
---|
52 | for p in mindi mondo mondo-doc mindi-kernel; do
|
---|
53 | v=${VER}
|
---|
54 | if [ $p == "mindi" ]; then
|
---|
55 | v=${MINDIMAJVER}.${MINDIMINVER}.${MINVER}
|
---|
56 | fi
|
---|
57 | echo "$v" > $p/VERSION
|
---|
58 | if [ -f $p/ChangeLog ]; then
|
---|
59 | grep -q "${v}-${TAG}" $p/ChangeLog
|
---|
60 | if [ $? -ne 0 ]; then
|
---|
61 | echo "You'll have to document in ${p}'s ChangeLog for ${v}-${TAG} related modifications"
|
---|
62 | exit -1
|
---|
63 | fi
|
---|
64 | fi
|
---|
65 | done
|
---|
66 | svn ci -m "Creation of ${VER}-$TAG"
|
---|
67 | svn up
|
---|
68 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.