]> rtime.felk.cvut.cz Git - jailhouse.git/blob - scripts/make_release
jailhouse: inmates: bench: Add -R option -- repeats count.
[jailhouse.git] / scripts / make_release
1 #!/bin/bash
2 #
3 # Jailhouse, a Linux-based partitioning hypervisor
4 #
5 # Copyright (c) Siemens AG, 2014
6 #
7 # Authors:
8 #  Jan Kiszka <jan.kiszka@siemens.com>
9 #
10 # This work is licensed under the terms of the GNU GPL, version 2.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 usage() {
15         echo "usage: $0 name"
16         exit 1
17 }
18
19 name=$1
20
21 if [ -z "$name" ]; then
22         usage
23 fi
24
25 if [ ! -f VERSION ] || [ ! -d .git ]; then
26         echo "Must be run from top-level directory"
27         exit 1
28 fi
29
30 if [ -n "`git status -s -uno`" ]; then
31         echo "Working directory is dirty!"
32         exit 1
33 fi
34
35 echo -e "Tag commit\n\n    `git log -1 --oneline`"
36 echo -e "\nof branch\n\n    `git branch | sed -n 's/^\* //p'`"
37 echo -ne "\nas $name? (y/N) "
38 read answer
39 if [ "$answer" != "y" ]; then
40         exit 1
41 fi
42
43 echo $name > VERSION
44 git commit -sv VERSION -m "Bump version number"
45 git tag -as $name -m "Release $name"