From: Iustin Pop Date: Mon, 29 Oct 2012 16:15:02 +0000 (+0100) Subject: Add a copy of ganeti's devel/release X-Git-Tag: v0.12~1 X-Git-Url: http://git.equinoxoli.org/?p=ext%2Finstance-debootstrap.git;a=commitdiff_plain;h=cc4f263ca3ace838f040f64ff4b816fa2eec6e44 Add a copy of ganeti's devel/release This has just the names changes, plus using standard distcheck/dist, instead of the ganeti-specific `-release' variants. Signed-off-by: Iustin Pop Reviewed-by: Bernardo Dal Seno --- diff --git a/devel/release b/devel/release new file mode 100755 index 0000000..c4c508e --- /dev/null +++ b/devel/release @@ -0,0 +1,66 @@ +#!/bin/bash + +# Copyright (C) 2012 Google Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +# This is a test script to ease development and testing on test clusters. +# It should not be used to update production environments. + +# Usage: release v2.0.5 +# Alternative: URL=file:///my/git/repo release e5823b7e2cd8a3... +# It will clone the given repository from the default or passed URL, +# checkout the given reference (a tag or branch) and then create a +# release archive; you will need to copy the archive and delete the +# temporary directory at the end + +set -e + +: ${URL:=git://git.ganeti.org/instance-debootstrap.git} +TAG="$1" + +if [[ -z "$TAG" ]]; then + echo "Usage: $0 " >&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-instance-debootstrap-$VERSION.tar.gz + +echo +echo 'MD5:' +md5sum ganeti-instance-debootstrap-$VERSION.tar.gz +echo +echo 'SHA1:' +sha1sum ganeti-instance-debootstrap-$VERSION.tar.gz +echo +echo "The archive is at $PWD/ganeti-instance-debootstrap-$VERSION.tar.gz" +echo "Please copy it and remove the temporary directory when done."