| 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 | |
|---|
| 15 | set -e |
|---|
| 16 | |
|---|
| 17 | if test "$1" = "-nodiff" ; then |
|---|
| 18 | diff=no |
|---|
| 19 | else |
|---|
| 20 | diff=yes |
|---|
| 21 | fi |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | devel="devel/" # comment out for the stable branch |
|---|
| 25 | |
|---|
| 26 | # test for uncommitted changes |
|---|
| 27 | if hg id | grep -q '+' |
|---|
| 28 | then |
|---|
| 29 | echo "Uncommitted changes" |
|---|
| 30 | exit 1 |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | # update the source |
|---|
| 34 | |
|---|
| 35 | hg 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 | |
|---|
| 43 | OVERSION="`cat VERSION`" |
|---|
| 44 | OTAG="mutt-`echo $OVERSION | tr . -`-rel" |
|---|
| 45 | |
|---|
| 46 | echo $OVERSION | awk -F . '{printf("%d.%d.%d\n", $1, $2, $3 + 1);}' > VERSION |
|---|
| 47 | ${VISUAL} VERSION |
|---|
| 48 | |
|---|
| 49 | VERSION="`cat VERSION`" |
|---|
| 50 | TAG="mutt-`echo $VERSION | tr . -`-rel" |
|---|
| 51 | |
|---|
| 52 | #echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > reldate.h |
|---|
| 53 | |
|---|
| 54 | make update-changelog |
|---|
| 55 | |
|---|
| 56 | # now, prepare the distribution tar balls |
|---|
| 57 | |
|---|
| 58 | #automake |
|---|
| 59 | #touch configure.in |
|---|
| 60 | make config.status |
|---|
| 61 | ./config.status |
|---|
| 62 | make update-doc |
|---|
| 63 | make update-changelog |
|---|
| 64 | (cd po && make update-po) |
|---|
| 65 | |
|---|
| 66 | # build them |
|---|
| 67 | |
|---|
| 68 | make dist |
|---|
| 69 | |
|---|
| 70 | # commit and tag the release |
|---|
| 71 | |
|---|
| 72 | hg commit -m "automatic post-release commit for mutt-${VERSION}" |
|---|
| 73 | #make commit-changelog |
|---|
| 74 | hg tag ${TAG} |
|---|
| 75 | |
|---|
| 76 | # build the diff between the two releases |
|---|
| 77 | |
|---|
| 78 | if test "$diff" = yes |
|---|
| 79 | then |
|---|
| 80 | hg diff -r ${OTAG} -r ${TAG} | gzip -9 \ |
|---|
| 81 | > diff-${OVERSION}-${VERSION}.gz |
|---|
| 82 | fi |
|---|
| 83 | |
|---|
| 84 | # sign the various files |
|---|
| 85 | |
|---|
| 86 | # DISTFILES="mutt-${VERSION}.tar.gz mutt-${VERSION}i.tar.gz diff-${OVERSION}i-${VERSION}i.gz" |
|---|
| 87 | DISTFILES="mutt-${VERSION}.tar.gz" |
|---|
| 88 | |
|---|
| 89 | if test "$diff" = yes ; then |
|---|
| 90 | DISTFILES="$DISTFILES diff-${OVERSION}-${VERSION}.gz" |
|---|
| 91 | fi |
|---|
| 92 | |
|---|
| 93 | for f in $DISTFILES; do |
|---|
| 94 | gpg -ba $f |
|---|
| 95 | chmod 644 $f.asc |
|---|
| 96 | done |
|---|
| 97 | |
|---|
| 98 | for f in $DISTFILES ; do |
|---|
| 99 | scp $f $f.asc trithemius.gnupg.org:/home/ftp/mutt/${devel} |
|---|
| 100 | done |
|---|
| 101 | |
|---|
| 102 | hg sign -m"mutt-${VERSION} signed" |
|---|
| 103 | |
|---|
| 104 | # Finally, announce the new mutt to the public |
|---|
| 105 | |
|---|
| 106 | # mutt -s "[Announce] mutt-${VERSION} is out" mutt-dev@mutt.org |
|---|