3 # Copyright (C) 2012 Google Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 # This is a test script to ease development and testing on test clusters.
21 # It should not be used to update production environments.
23 # Usage: release v2.0.5
24 # Alternative: URL=file:///my/git/repo release e5823b7e2cd8a3...
25 # It will clone the given repository from the default or passed URL,
26 # checkout the given reference (a tag or branch) and then create a
27 # release archive; you will need to copy the archive and delete the
28 # temporary directory at the end
32 : ${URL:=git://git.ganeti.org/instance-debootstrap.git}
35 if [[ -z "$TAG" ]]; then
36 echo "Usage: $0 <tree-ish>" >&2
40 echo "Using Git repository $URL"
42 TMPDIR=$(mktemp -d -t gntrelease.XXXXXXXXXX)
45 echo "Cloning the repository under $TMPDIR ..."
46 git clone -q "$URL" dist
52 VERSION=$(sed -n -e '/^PACKAGE_VERSION =/ s/^PACKAGE_VERSION = // p' Makefile)
56 tar tzvf ganeti-instance-debootstrap-$VERSION.tar.gz
60 md5sum ganeti-instance-debootstrap-$VERSION.tar.gz
63 sha1sum ganeti-instance-debootstrap-$VERSION.tar.gz
65 echo "The archive is at $PWD/ganeti-instance-debootstrap-$VERSION.tar.gz"
66 echo "Please copy it and remove the temporary directory when done."