source: trunk/tools/mknewversion @ 793

Last change on this file since 793 was 764, checked in by bruno, 13 years ago

merge -r728:763 $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
10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ ${prem} == "/" ]; then
13    export TOOLHOME=$dname
14else
15    export TOOLHOME=${PWD}/$dname
16fi
17
18. $TOOLHOME/common-env
19. $TOOLHOME/distro-env
20
21# We need to get $VER
22if [ "$1" = "" ]; then
23    LAST=`cat ${TOPDIR}/LAST`
24else
25    LAST=$1
26    shift
27fi
28VER=`echo $LAST | cut -d- -f1`
29MAJVER=`echo $VER | cut -d. -f1-2`
30MINDIMAJVER=`echo $VER | cut -d. -f1`
31MINDIMINVER=`echo $VER | cut -d. -f2`
32((MINDIMAJVER=$MINDIMAJVER-1))
33MINVER=`echo $VER | cut -d. -f3`
34TAG=1
35((MINVER=$MINVER+1))
36VER=${MAJVER}.${MINVER}
37echo "Changing Version $LAST to ${VER}-${TAG}"
38grep -q stable $TOOLHOME/../mondo/VERSION
39if [ $? -ne 0 ]; then
40    echo "A new version can only be made from stable"
41    exit -1
42fi
43nb=`svn diff $TOOLHOME/.. | wc -l`
44if [ $nb -gt 0 ]; then
45    echo "You'll have to check in before changing version"
46else
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
68fi
Note: See TracBrowser for help on using the repository browser.