X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=buildship;h=f5a66d9197f8080b07ebd007463f1b5f94078490;hb=f9ab812021dedc78f7ebc8655ced1b2289fa4c1d;hp=2627ae17b82005f822714246e63484a3d7f287f9;hpb=ca2dbe151903558093635b0dfeea66a73447b5ff;p=userv.git diff --git a/buildship b/buildship index 2627ae1..f5a66d9 100755 --- a/buildship +++ b/buildship @@ -1,10 +1,47 @@ #!/bin/sh +# to release, check out a fresh copy and then run this + +set -e if test $# = 0 then - echo >&2 'usage: buildship VERSION=' + echo >&2 'usage: buildship ' exit 1 fi +version=$1 +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 "$@" +make ship VERSION=$version + +cd shipcheck + +echo >&2 '*** Checking whether identical to repository version ...' +tar zxf $targz +cvs co -r $tag userv +cp userv-$version/* userv/. +cd userv +if test "x`cvs -n update`" != x +then + echo >&2 mismatch: + cvs -n update + exit 1 +fi +cd .. +rm -rf userv + +echo >&2 '*** Doing test build ...' +cd userv-$version +./configure +make + +cd ../.. + +echo >&2 "*** OK. Distribution file is ../$targz." +mv -f shipcheck/$targz ..