-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-release
executable file
·50 lines (31 loc) · 1.5 KB
/
build-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh
# Build an hlfl release.
# extensively borrowed from mutt build-release
# thanks to Thomas Roessler <[email protected]> for it
# update the source
cvs update
# bump the version number, and calculate the tags
OVERSION="`grep AC_INIT configure.in|cut -d"," -f 2`"
OTAG="hlfl-`echo $OVERSION | tr . -`-rel"
VERSION="`echo $OVERSION | awk -F . '{printf("%d.%d.%d\n", $1, $2, $3 + 1);}'`"
TAG="hlfl-`echo $VERSION | tr . -`-rel"
sed -e "s/${OVERSION}/ ${VERSION}/g" configure.in >configure.in.new; mv configure.in.new configure.in
rcs2log -v -u "asl:Arnaud Launay:[email protected]" -u "renaud:Renaud Deraison:[email protected]" > ChangeLog
#${EDITOR} ChangeLog
# now, tag the release
cvs commit -m "automatic post-release commit for hlfl-${VERSION}"
cvs tag ${TAG}
# prepare the tarballs
( ./autogen.sh && ./configure && make dist && mv hlfl-${VERSION}.tar.gz /tmp &&
cd /tmp && gunzip -c hlfl-${VERSION}.tar.gz | bzip2 -k9 >hlfl-${VERSION}.tar.bz2 )
# build the diffs
cvs rdiff -u -r ${OTAG} -r ${TAG} hlfl | gzip -9 \
> /tmp/diff-${OVERSION}-${VERSION}.gz
cvs rdiff -u -r ${OTAG} -r ${TAG} hlfl | bzip2 -9 \
> /tmp/diff-${OVERSION}-${VERSION}.bz2
# upload the release to the net
DISTFILES="hlfl-${VERSION}.tar.bz2 hlfl-${VERSION}.tar.gz diff-${OVERSION}-${VERSION}.bz2 diff-${OVERSION}-${VERSION}.gz"
cd /tmp && scp $DISTFILES raccoon.nessus.org:/ftp/pub/hlfl
cd /tmp && scp $DISTFILES raccoon.nessus.org:/web/www.hlfl.org/hlfl
# Announce it to people
mutt -s "HLFL-${VERSION} is out" [email protected]