From 2b32e20c7a6c68b8bede35d55c9b0328b90d0969 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 18 Dec 2009 14:09:44 +0100
Subject: [PATCH] Add a release script

Currently releases are done via the manual procedure on
http://code.google.com/p/ganeti/wiki/ReleaseProcess, but that is not
very reliable, and breaks for rc releases. The 1.2.9/2.0.5/2.1.0~rc2
releases were done with this new script that eases the process.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 devel/release | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100755 devel/release

diff --git a/devel/release b/devel/release
new file mode 100755
index 000000000..ba1c12867
--- /dev/null
+++ b/devel/release
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# Copyright (C) 2009 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/ganeti.git}
+TAG="$1"
+
+TMPDIR=`mktemp -d`
+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
+sha1sum 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."
-- 
GitLab