mutt stable branch with some hacks
1#!/bin/sh --
2
3#
4# Build a mutt release.
5#
6# This used to be part of the main Makefile, but is better handled
7# by a shell script.
8#
9# Note that this script won't work for you. I'm including it with
10# the distribution for the sake of completeness.
11#
12# Thomas Roessler <roessler@does-not-exist.org> Mon, 8 Nov 1999 22:32:41 +0100
13#
14
15set -e
16
17if test "$1" = "-nodiff" ; then
18 diff=no
19else
20 diff=yes
21fi
22
23
24#devel="devel/" # comment out for the stable branch
25
26# test for uncommitted changes
27if hg id | grep -q '+'
28then
29 echo "Uncommitted changes"
30 exit 1
31fi
32
33# update the source
34
35hg update
36
37# Do automated security checks
38
39./check_sec.sh || exit 1
40
41# bump the version number, and calculate the tags
42
43OVERSION="`cat VERSION`"
44OTAG="mutt-`echo $OVERSION | tr . -`-rel"
45
46echo $OVERSION | awk -F . '{printf("%d.%d.%d\n", $1, $2, $3 + 1);}' > VERSION
47${VISUAL:-vi} VERSION
48
49VERSION="`cat VERSION`"
50TAG="mutt-`echo $VERSION | tr . -`-rel"
51
52#echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > reldate.h
53
54# now, prepare the distribution tar balls
55
56automake --add-missing --copy --force-missing
57touch configure.ac
58make config.status
59./config.status
60make update-doc
61make update-changelog
62(cd po && make update-po)
63
64# build them
65
66make dist
67
68# commit and tag the release
69
70hg commit -m "automatic post-release commit for mutt-${VERSION}"
71#make commit-changelog
72hg tag ${TAG}
73
74# build the diff between the two releases
75
76if test "$diff" = yes
77then
78 hg diff -r ${OTAG} -r ${TAG} | gzip -9 \
79 > diff-${OVERSION}-${VERSION}.gz
80fi
81
82# sign the various files
83
84# DISTFILES="mutt-${VERSION}.tar.gz mutt-${VERSION}i.tar.gz diff-${OVERSION}i-${VERSION}i.gz"
85DISTFILES="mutt-${VERSION}.tar.gz"
86
87if test "$diff" = yes ; then
88 DISTFILES="$DISTFILES diff-${OVERSION}-${VERSION}.gz"
89fi
90
91for f in $DISTFILES; do
92 gpg -ba $f
93 chmod 644 $f.asc
94done
95
96for f in $DISTFILES ; do
97 scp $f $f.asc trithemius.gnupg.org:/home/ftp/mutt/${devel}
98done
99
100hg sign -m"mutt-${VERSION} signed" ${TAG}
101
102# Finally, announce the new mutt to the public
103
104# mutt -s "[Announce] mutt-${VERSION} is out" mutt-dev@mutt.org
105