changelog, etc.: Finalise 1.5.1.
[adns] / RELEASE-CHECKLIST
1 #!/bin/bash
2 # This is for the benefit of the upstream maintainers of GNU adns
3 #
4 # * Maybe rerun autoconf
5 # * Ensure changelog reflects changes
6 # * Ensure NEWS reflects changes
7 # * Maybe update copyright dates
8 # * Maybe update MAJOR and/or MINOR in common.make.in
9 # * Update DISTVERSION in Makefile.in
10 # * Update ADNS_VERSION_STRING in client/client.h
11 # * Update version in ./changelog
12 # * Commit the result
13 #
14 # * Run this script
15 # ./RELEASE-CHECKLIST [--real] <version>
16 #
17 # * On chiark, maybe, replace ~ian/public-html/adns/current
18 # with symlink to web-$(version)
19 #
20 # * On chiark, maybe, replace docs link (as directed by script)
21 #
22 # * If not an rc release, put files on ftp.gnu.org
23 #
24 # * Send release announcement (use last one as template)
25 #
26 # * Update DISTVERSION, ADNS_VERSION_STRING and start new changelog entry
27
28 set -e
29
30 fail () { echo >&2 "$0: $*"; exit 16; }
31
32 real=false
33 if [ "x$1" = x--real ]; then
34 real=true; shift
35 fi
36
37 if [ $# != 1 ]; then fail "wrong # arguments"; fi
38 wantversion="$1"
39
40 version=`sed -n <Makefile.in 's/^DISTVERSION=[ ]*//p'`
41
42 if [ "x$version" != "x$wantversion" ]; then
43 fail "you say version $wantversion but tree is $version"
44 fi
45
46 gpgkey='-u 0x48B50D39'
47 chiark=chiark:/u/ian/public-html/adns
48 chiarkftp=$chiark/ftp
49
50 x () { echo "----- $* -----"; "$@"; }
51 wx () { if $real; then x "$@"; else echo "WOULD: $*"; fi; }
52
53 x git clean -xdff
54 x ./configure
55 x make -j6
56 x make check -j6
57 x make dist
58 rm -rf web
59 x make web-install
60
61 distdir=adns-$version
62 distfile=$distdir.tar.gz
63 x test -f $distfile
64
65 rm -rf dist_tmp
66 mkdir dist_tmp
67 cd dist_tmp
68 tar axf ../$distfile
69 cd $distdir
70 git init --quiet
71 git fetch --quiet ../.. HEAD
72 git add .
73 git commit --quiet -m T
74 git diff --exit-code FETCH_HEAD
75 cd ../..
76
77 tag=adns-${version//\~/-}
78 webout=docs-$version
79
80 wx gpg --detach-sign $distfile
81 wx git tag -s $gpgkey -m "adns release $version" $tag
82 wx git push origin $tag~0:master $tag
83
84 distfiles="$distfile $distfile.sig"
85 wx rsync -vP $distfiles $chiarkftp/
86
87 wx rsync -rvP web/. $chiark/$webout
88
89 wx sha256sum $distfiles
90
91 if ! $real; then echo "NOT REAL"; exit 0; fi
92
93 cat <<END
94
95 TO UPDATE WEB PAGE DOCS:
96 ssh ${chiark%%:*}
97 cd ${chiark#*:}
98 rm -f docs.tmp
99 ln -s $webout docs.tmp
100 mv -Tf docs.tmp docs
101 END