source: branches/stable/tools/mknewversion @ 651

Last change on this file since 651 was 651, checked in by bcornec, 13 years ago

Lots of bug fixes on delivery process
Addition of mkannounce to generate announces of new versions automatically

  • 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
10umask 022
11dname=`dirname $0`
12prem=`echo $dname |cut -c1`
13if [ ${prem} == "/" ]; then
14    export TOOLHOME=$dname
15else
16    export TOOLHOME=${PWD}/$dname
17fi
18
19. $TOOLHOME/common-env
20. $TOOLHOME/distro-env
21
22# We need to get $VER
23if [ "$1" = "" ]; then
24    LAST=`cat ${TOPDIR}/LAST`
25else
26    LAST=$1
27    shift
28fi
29VER=`echo $LAST | cut -d- -f1`
30MAJVER=`echo $VER | cut -d. -f1-2`
31MINDIMAJVER=`echo $VER | cut -d. -f1`
32MINDIMINVER=`echo $VER | cut -d. -f2`
33((MINDIMAJVER=$MINDIMAJVER-1))
34MINVER=`echo $VER | cut -d. -f3`
35TAG=1
36((MINVER=$MINVER+1))
37VER=${MAJVER}.${MINVER}
38echo "Changing Version $LAST to ${VER}-${TAG}"
39grep -q stable $TOOLHOME/../mondo/VERSION
40if [ $? -ne 0 ]; then
41    echo "A new version can only be made from stable"
42    exit -1
43fi
44nb=`svn diff $TOOLHOME/.. | wc -l`
45if [ $nb -gt 0 ]; then
46    echo "You'll have to check in before changing version"
47else
48    svn copy $SVN_M/branches/stable $SVN_M/branches/${VER}
49    cd $TOOLHOME/../..
50    svn co $SVN_M/branches/${VER} ${VER}
51    cd ${VER}
52    echo "$TAG" > tools/TAG
53    for p in mindi mondo mondo-doc mindi-kernel; do
54        v=${VER}
55        if [ $p == "mindi" ]; then
56            v=${MINDIMAJVER}.${MINDIMINVER}.${MINVER}
57        fi
58        echo "$v" > $p/VERSION
59        if [ -f $p/ChangeLog ]; then
60            grep -q "${v}-${TAG}" $p/ChangeLog
61            if [ $? -ne 0 ]; then
62                echo "You'll have to document in ${p}'s ChangeLog for ${v}-${TAG} related modifications"
63                exit -1
64            fi
65        fi
66    done
67    svn ci -m "Creation of ${VER}-$TAG"
68    svn up
69fi
Note: See TracBrowser for help on using the repository browser.