root / devel / release @ 2b32e20c
History | View | Annotate | Download (1.7 kB)
1 | 2b32e20c | Iustin Pop | #!/bin/bash |
---|---|---|---|
2 | 2b32e20c | Iustin Pop | |
3 | 2b32e20c | Iustin Pop | # Copyright (C) 2009 Google Inc. |
4 | 2b32e20c | Iustin Pop | # |
5 | 2b32e20c | Iustin Pop | # This program is free software; you can redistribute it and/or modify |
6 | 2b32e20c | Iustin Pop | # it under the terms of the GNU General Public License as published by |
7 | 2b32e20c | Iustin Pop | # the Free Software Foundation; either version 2 of the License, or |
8 | 2b32e20c | Iustin Pop | # (at your option) any later version. |
9 | 2b32e20c | Iustin Pop | # |
10 | 2b32e20c | Iustin Pop | # This program is distributed in the hope that it will be useful, but |
11 | 2b32e20c | Iustin Pop | # WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | 2b32e20c | Iustin Pop | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | 2b32e20c | Iustin Pop | # General Public License for more details. |
14 | 2b32e20c | Iustin Pop | # |
15 | 2b32e20c | Iustin Pop | # You should have received a copy of the GNU General Public License |
16 | 2b32e20c | Iustin Pop | # along with this program; if not, write to the Free Software |
17 | 2b32e20c | Iustin Pop | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | 2b32e20c | Iustin Pop | # 02110-1301, USA. |
19 | 2b32e20c | Iustin Pop | |
20 | 2b32e20c | Iustin Pop | # This is a test script to ease development and testing on test clusters. |
21 | 2b32e20c | Iustin Pop | # It should not be used to update production environments. |
22 | 2b32e20c | Iustin Pop | |
23 | 2b32e20c | Iustin Pop | # Usage: release v2.0.5 |
24 | 2b32e20c | Iustin Pop | # Alternative: URL=file:///my/git/repo release e5823b7e2cd8a3... |
25 | 2b32e20c | Iustin Pop | # It will clone the given repository from the default or passed URL, |
26 | 2b32e20c | Iustin Pop | # checkout the given reference (a tag or branch) and then create a |
27 | 2b32e20c | Iustin Pop | # release archive; you will need to copy the archive and delete the |
28 | 2b32e20c | Iustin Pop | # temporary directory at the end |
29 | 2b32e20c | Iustin Pop | |
30 | 2b32e20c | Iustin Pop | set -e |
31 | 2b32e20c | Iustin Pop | |
32 | 2b32e20c | Iustin Pop | : ${URL:=git://git.ganeti.org/ganeti.git} |
33 | 2b32e20c | Iustin Pop | TAG="$1" |
34 | 2b32e20c | Iustin Pop | |
35 | 2b32e20c | Iustin Pop | TMPDIR=`mktemp -d` |
36 | 2b32e20c | Iustin Pop | cd $TMPDIR |
37 | 2b32e20c | Iustin Pop | echo "Cloning the repository under $TMPDIR ..." |
38 | 2b32e20c | Iustin Pop | git clone -q "$URL" dist |
39 | 2b32e20c | Iustin Pop | cd dist |
40 | 2b32e20c | Iustin Pop | git checkout $TAG |
41 | 2b32e20c | Iustin Pop | ./autogen.sh |
42 | 2b32e20c | Iustin Pop | ./configure |
43 | 2b32e20c | Iustin Pop | VERSION=$(sed -n -e '/^PACKAGE_VERSION =/ s/^PACKAGE_VERSION = // p' Makefile) |
44 | 2b32e20c | Iustin Pop | make distcheck |
45 | 2b32e20c | Iustin Pop | fakeroot make dist |
46 | 2b32e20c | Iustin Pop | tar tzvf ganeti-$VERSION.tar.gz |
47 | 2b32e20c | Iustin Pop | sha1sum ganeti-$VERSION.tar.gz |
48 | 2b32e20c | Iustin Pop | echo "The archive is at $PWD/ganeti-$VERSION.tar.gz" |
49 | 2b32e20c | Iustin Pop | echo "Please copy it and remove the temporary directory when done." |