Commit 5548de18 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Small improvements for release script

- Print usage if no tree-ish (tag, branch or commit) was
- 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: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent bdba4757
...@@ -32,18 +32,35 @@ set -e ...@@ -32,18 +32,35 @@ set -e
: ${URL:=git://} : ${URL:=git://}
TAG="$1" TAG="$1"
TMPDIR=`mktemp -d` if [[ -z "$TAG" ]]; then
echo "Usage: $0 <tree-ish>" >&2
exit 1
echo "Using Git repository $URL"
TMPDIR=$(mktemp -d -t gntrelease.XXXXXXXXXX)
echo "Cloning the repository under $TMPDIR ..." echo "Cloning the repository under $TMPDIR ..."
git clone -q "$URL" dist git clone -q "$URL" dist
cd dist cd dist
git checkout $TAG git checkout $TAG
./ ./
./configure ./configure
VERSION=$(sed -n -e '/^PACKAGE_VERSION =/ s/^PACKAGE_VERSION = // p' Makefile) VERSION=$(sed -n -e '/^PACKAGE_VERSION =/ s/^PACKAGE_VERSION = // p' Makefile)
make distcheck make distcheck
fakeroot make dist fakeroot make dist
tar tzvf ganeti-$VERSION.tar.gz tar tzvf ganeti-$VERSION.tar.gz
echo 'MD5:'
md5sum ganeti-$VERSION.tar.gz
echo 'SHA1:'
sha1sum ganeti-$VERSION.tar.gz sha1sum ganeti-$VERSION.tar.gz
echo "The archive is at $PWD/ganeti-$VERSION.tar.gz" echo "The archive is at $PWD/ganeti-$VERSION.tar.gz"
echo "Please copy it and remove the temporary directory when done." echo "Please copy it and remove the temporary directory when done."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment