X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=buildship;h=e10562b2c09eba7ca89e416f3976f00ecb2f7bc7;hp=9ab54ef3781a8ee9afaf9774bd6abcfcec1adb42;hb=b6c671fd90134d458ad4722ec3a99742bced1a34;hpb=25fb518076d49f38e12431861e3cb8dd050955ed diff --git a/buildship b/buildship index 9ab54ef..e10562b 100755 --- a/buildship +++ b/buildship @@ -1,10 +1,43 @@ #!/bin/sh -if test $# = 1 +# to release, check out a fresh copy and then run this + +set -e +version="`sed -n '/^userv (.*)/!d; s/^userv (//; s/).*//; p; q' Changelog`" +targz=userv-$version.tar.gz +tag=`echo release-$version | sed -e 's/\./-/g'` + +echo >&2 "*** Tagging (version $version, tag $tag) ..." +cvs tag -F -c $tag + +echo >&2 '*** Generating pre-built files ...' +autoconf +autoheader +./configure +make ship VERSION=$version + +cd shipcheck + +echo >&2 '*** Checking whether identical to repository version ...' +tar zxf $targz +cvs co -r $tag userv +cd userv-$version +cp -r . ../userv/. +cd ../userv +if test "x`cvs -n update`" != x then - echo >&2 'usage: buildship VERSION=' + echo >&2 mismatch: + cvs -n update exit 1 fi -autoconf -autoheader +cd .. +rm -rf userv + +echo >&2 '*** Doing test build ...' +cd userv-$version ./configure -make ship "$@" +make + +cd ../.. + +echo >&2 "*** OK. Distribution file is ../$targz." +mv -f shipcheck/$targz ..