1 #!/bin/sh
2 set -e
3 VERSION=`perl -n -e 'm/\QAC_INIT([rrdtool],[\E(.+?)\Q])\E/ && print $1' configure.ac`
4 PERLVERS=`perl -n -e 'm/NUMVERS=(\d+\.\d+)/ && print $1' configure.ac`
5 set -x
6 perl -i -p -e 's/^\$VERSION.+/\$VERSION='$PERLVERS';/' bindings/perl-*/*.pm
7 perl -i -p -e 's/RRDtool 1\S+/RRDtool '$VERSION'/ && s/Copyright.+?Oetiker.+\d{4}/Copyright by Tobi Oetiker, 1997-2010/' src/*.h src/*.c
8 perl -i -p -e 's/^Version:.+/Version: '$VERSION'/' rrdtool.spec
9 perl -i -p -e 's/rrdtool-[\.\d]+\d(pre\d+)?(rc\d+)?/rrdtool-'$VERSION'/g' doc/rrdbuild.pod
10 svn diff
11 echo "Tagging and releasing rrdtool $VERSION ($PERLVERS). Press any Key to continue."
12 read somekey
13 svn commit -m "prepare for the release of rrdtool-$VERSION"
14 OPWD=`pwd`
15 cd /tmp
16 svn export svn://svn.oetiker.ch/rrdtool/trunk/program rrdtool-$$
17 cd rrdtool-$$
18 #svn log --stop-on-copy --xml --verbose svn://svn.oetiker.ch/rrdtool/trunk | \
19 # xsltproc --stringparam strip-prefix trunk/program $OPWD/svn2cl.xsl - >CHANGES
20 sh MakeMakefile
21 #PKG_CONFIG_PATH=/usr/pack/rrdtool-1.3svn-to/i686-debian-linux3.1/lib/pkgconfig/
22 #export PKG_CONFIG_PATH
23 ./configure --enable-maintainer-mode
24 make dist
25 # do a test build
26 tar zxvf rrdtool*.tar.gz
27 cd rrdtool-$VERSION
28 ./configure
29 make
30 src/rrdtool
31 cd ..
32 echo READY TO DIST ... press ENTER
33 read x
35 scp CHANGES rrdtool*.tar.gz oposs@james:public_html/rrdtool/pub
36 ssh oposs@james "cd public_html/rrdtool/pub/;rm rrdtool.tar.gz;ln -s rrdtool-$VERSION.tar.gz rrdtool.tar.gz"
37 cd ..
38 rm -rf rrdtool-$$
39 svn copy -m "tagging version $VERSION" svn://svn.oetiker.ch/rrdtool/trunk/program svn://svn.oetiker.ch/rrdtool/tags/$VERSION