source: MondoRescue/branches/2.0.9/tools/mknewtag@ 982

Last change on this file since 982 was 775, checked in by Bruno Cornec, 18 years ago

Bur #41 fixed for 2.0.9

  • Property svn:executable set to *
File size: 1016 bytes
Line 
1#!/bin/bash
2#
3# Prepare a new delivery of the same version by changing TAG
4#
5# $Id$
6#
7# Syntax: mknewtag
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 and $TAG
22if [ "$1" = "" ]; then
23 LAST=`cat ${TOPDIR}/LAST`
24else
25 LAST=$1
26 shift
27fi
28VER=`echo $LAST | cut -d- -f1`
29
30TAG=`echo $LAST | cut -d- -f2`
31echo -n "Changing TAG of version $VER value from $TAG to "
32((TAG=$TAG+1))
33echo "$TAG"
34nb=`svn diff $TOOLHOME/.. | wc -l`
35if [ $nb -gt 0 ]; then
36 echo "You'll have to check in before updating the TAG"
37 exit -1
38else
39 for p in mindi mondo; do
40 v=`cat $TOOLHOME/../$p/VERSION`
41 grep -q "${v}" $TOOLHOME/../$p/ChangeLog
42 if [ $? -ne 0 ]; then
43 echo "You'll have to document in ${p}'s ChangeLog for ${v} related modifications"
44 exit -1
45 fi
46 done
47 echo "$TAG" > $TOOLHOME/TAG
48 (cd $TOOLHOME/.. ; svn ci -m "Automatic update of TAG to $TAG" ; svn up)
49fi
Note: See TracBrowser for help on using the repository browser.