Store HIGHESTMODSEQ as a string, since it may be too large for 32-bit Emacsen.
[gnus.git] / makepub
blobd76a4a791fc6684169f938f797b62f9ac1cff18f
1 #!/bin/bash
2 name="No Gnus"
4 if [ `whoami` != "larsi" ]; then
5 echo "This script is for larsi only"
6 exit
7 fi
9 # First do a release commit on the current version.
11 version=`grep "defconst gnus-version-number" lisp/gnus.el | \
12 sed 's/[^.0-9]//g'`
14 initial=`echo "$name" | sed 's/^\([A-Z]\).*/\1/g' | tr A-Z a-z`
16 prefix=`echo $version | sed 's/^\(.*[.]\)\([0-9][0-9]*\)/\1/'`
17 next_version=`echo $version | sed 's/^\(.*[.]\)\([0-9][0-9]*\)/\2/'`
18 next_version=`expr $next_version + 1`
19 next_version="$prefix$next_version"
21 date=`TZ=Z date "+%Y-%m-%d"`
22 echo -e "$date Lars Magne Ingebrigtsen <lars@ingebrigtsen.no>\n\n\t* gnus.el: $name v$next_version is released.\n"\
23 > /tmp/changelog
24 cat lisp/ChangeLog >> /tmp/changelog
25 mv /tmp/changelog lisp/ChangeLog
27 # Then update the sources to the next version.
29 sed "s/$name v[.0-9]*/$name v$next_version/" texi/gnus.texi > g.texi.tmp
30 mv g.texi.tmp texi/gnus.texi
31 sed "s/$name v[.0-9]*/$name v$next_version/" texi/message.texi > m.texi.tmp
32 mv m.texi.tmp texi/message.texi
33 sed "s/defconst gnus-version-number \"$version\"/defconst gnus-version-number \"$next_version\"/" lisp/gnus.el > g.el.tmp
34 mv g.el.tmp lisp/gnus.el
36 git commit -a -m "$name v$next_version is released"
38 tversion=`echo $next_version | sed 's/[.]/-/g'`
40 git tag -a "$initial$tversion" -m "$name v$next_version is released"
42 git push && git push master tag "$initial$tversion"
44 # Increase the number, yet again, to start the next development cycle.
46 version=$next_version
48 prefix=`echo $version | sed 's/^\(.*[.]\)\([0-9][0-9]*\)/\1/'`
49 next_version=`echo $version | sed 's/^\(.*[.]\)\([0-9][0-9]*\)/\2/'`
50 next_version=`expr $next_version + 1`
51 next_version="$prefix$next_version"
53 sed "s/$name v[.0-9]*/$name v$next_version/" texi/gnus.texi > g.texi.tmp
54 mv g.texi.tmp texi/gnus.texi
55 sed "s/$name v[.0-9]*/$name v$next_version/" texi/message.texi > m.texi.tmp
56 mv m.texi.tmp texi/message.texi
57 sed "s/defconst gnus-version-number \"$version\"/defconst gnus-version-number \"$next_version\"/" lisp/gnus.el > g.el.tmp
58 mv g.el.tmp lisp/gnus.el
60 git commit -a -m "$name v$next_version is begun"
61 git push