mirror of https://github.com/apache/cloudstack.git
appliance: use the right way to get git branch name
Taken from Junio C Hamano's blog [1], git's maintainer, he must not be wrong :)
[1] http://git-blame.blogspot.ch/2013/06/checking-current-branch-programatically.html
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e16414e56d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
d33278250d
commit
ffe0f2f60f
|
|
@ -31,12 +31,9 @@ build_date=`date +%Y-%m-%d`
|
|||
branch=
|
||||
|
||||
if [ -z "$branch" ] ; then
|
||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
branch=`git symbolic-ref --short -q HEAD 2>/dev/null || echo unknown`
|
||||
fi
|
||||
|
||||
if [ -z "$branch" ] ; then
|
||||
branch=unknown
|
||||
fi
|
||||
rootdir=$PWD
|
||||
|
||||
# Initialize veewee and dependencies
|
||||
|
|
|
|||
Loading…
Reference in New Issue