From 5548de18b9417c16ff3e91f7e65a33d90f0fe941 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Wed, 13 Jan 2010 17:37:15 +0100 Subject: [PATCH] Small improvements for release script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Print usage if no tree-ish (tag, branch or commit) was specified. - Use βgntrelease.XXXXXXXXXXβ as temporary directory template. This makes it easier to find all of them. - Compute MD5 checksum. This doesn't cost a lot and might come in handy one day. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- devel/release | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/devel/release b/devel/release index ba1c12867..343781738 100755 --- a/devel/release +++ b/devel/release @@ -32,18 +32,35 @@ set -e : ${URL:=git://git.ganeti.org/ganeti.git} TAG="$1" -TMPDIR=`mktemp -d` +if [[ -z "$TAG" ]]; then + echo "Usage: $0 <tree-ish>" >&2 + exit 1 +fi + +echo "Using Git repository $URL" + +TMPDIR=$(mktemp -d -t gntrelease.XXXXXXXXXX) cd $TMPDIR + echo "Cloning the repository under $TMPDIR ..." git clone -q "$URL" dist cd dist git checkout $TAG ./autogen.sh ./configure + VERSION=$(sed -n -e '/^PACKAGE_VERSION =/ s/^PACKAGE_VERSION = // p' Makefile) + make distcheck fakeroot make dist tar tzvf ganeti-$VERSION.tar.gz + +echo +echo 'MD5:' +md5sum ganeti-$VERSION.tar.gz +echo +echo 'SHA1:' sha1sum ganeti-$VERSION.tar.gz +echo echo "The archive is at $PWD/ganeti-$VERSION.tar.gz" echo "Please copy it and remove the temporary directory when done." -- GitLab