3 # do a smartmontools release
4 # (C) 2003-6 Bruce Allen <ballen4705@users.sourceforge.net>,
5 # Guido Guenther <agx@sigxcpu.org>
6 # $Id: do_release 2845 2009-07-18 13:25:18Z chrfranke $
8 echo 'TODO: Rework this script for SVN.'
11 # Notes on generating releases:
13 # (2) update CHANGELOG -- put in release number
14 # (3) update release number in configure.in
15 # (4) to test, set USECVS below to 0
16 # (5) when satisfied, set USECVS below to 1
25 unset CVS_SERVER ||
echo "can't unset CVS_SERVER=$CVS_SERVER"
27 CVSROOT
=:ext
:ballen4705@smartmontools.cvs.sourceforge.net
:/cvsroot
/smartmontools
32 VERSION
=`grep 'AC_INIT' configure.in | awk '{ print $2 }' | sed s/,//g`
33 RELEASE
="RELEASE_${VERSION//\./_}"
34 echo "Version: $VERSION"
35 echo "Release: $RELEASE"
40 MINOR
=`echo $VERSION | cut -d. -f2`
41 MAJOR
=`echo $VERSION | cut -d. -f1`
42 PERL_OLD
=$MAJOR\\.
$MINOR
44 NEW_VERSION
=$MAJOR.
$MINOR
45 PERL_NEW
=$MAJOR\\.
$MINOR
46 NEW_RELEASE
="RELEASE_${NEW_VERSION//\./_}"
47 echo "New Version: $NEW_VERSION"
48 echo "New Release: $NEW_RELEASE"
51 # run automake/autoconf
52 if [ -f Makefile
] ; then
53 make distcheck ||
exit 1
56 rm -f Makefile configure
59 smartmontools_release_date
=`date -u +"%Y/%m/%d"`
60 smartmontools_release_time
=`date -u +"%T %Z"`
61 cat configure.
in |
sed "s|smartmontools_release_date=.*|smartmontools_release_date=${smartmontools_release_date}|" > configure.tmp
62 cat configure.tmp |
sed "s|smartmontools_release_time=.*|smartmontools_release_time=\"${smartmontools_release_time}\"|" > configure.
in
70 if [ $USECVS -ne 0 ] ; then
72 cvs commit
-m "Release $VERSION $RELEASE"
82 make distcheck ||
exit 1
85 # increase release number:
87 if [ $USECVS -ne 0 ] ; then
88 perl
-p -i.bak
-e "s/$PERL_OLD/$PERL_NEW/" configure.
in
91 cp -f build
/smartmontools-
$VERSION.
tar.gz .
93 gpg
--default-key $KEYID --armor --detach-sign .
/smartmontools-
$VERSION.
tar.gz
97 rm -rf autom4te.cache build
/ config.h.
in Makefile.
in examplescripts
/Makefile.
in \
98 depcomp mkinstalldirs install-sh configure config.guess config.sub \
99 aclocal.
m4 missing
*.bak