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