]> git.sur5r.net Git - openldap/blob - build/mkrelease
Return to release engineering
[openldap] / build / mkrelease
1 #! /bin/sh
2 # $OpenLDAP$
3 ## Copyright 1998-2003 The OpenLDAP Foundation
4 ## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
5 ## of this package for details.
6 #
7 # Make a release
8 #       mkrelease RELNAME CVSTAG CVSMODULES
9 # where CVSTAG is the tag to export from the current CVSROOT
10 #
11
12 #
13 # This script MUST NOT add files to the export nor modify
14 # any file in the export.
15 #
16
17 set -e          # exit immediately if any errors occur
18
19 if test $# != 3 ; then
20         echo 'usage: mkrelease RELNAME CVSTAG CVSMODULES ...'
21         exit 1
22 fi
23
24 RELNAME=openldap-$1
25 shift
26 CVSTAG=$1
27 shift
28
29 if test -e $RELNAME ; then
30         echo "error: $RELNAME exists"
31         exit 1
32 fi
33
34 echo Release: $RELNAME
35 echo CVS Tag: $CVSTAG
36 echo Modules: $*
37
38 cvs -q export -r $CVSTAG -d $RELNAME $*
39
40 if test ! -d $RELNAME ; then
41         echo "error: $RELNAME doesn't exists"
42         exit 1
43 fi
44
45 if test ! -e $RELNAME/build/version.sh ; then
46         echo "No build version"
47         exit 1
48 fi
49
50 eval `$RELNAME/build/version.sh`
51
52 tar cf $RELNAME.tar $RELNAME
53 gzip -9 -c $RELNAME.tar > $RELNAME.tgz
54 md5 $RELNAME.tgz > $RELNAME.md5
55 rm -f $RELNAME.tar
56
57 ls -l $RELNAME.*
58
59 echo "Made $OL_STRING as $RELNAME.tgz"