Repository: cloudstack Updated Branches: refs/heads/4.4 493c0a68d -> e16414e56
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.ya...@shapeblue.com> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e16414e5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e16414e5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e16414e5 Branch: refs/heads/4.4 Commit: e16414e56d8f398f8ddbbde89d3ee833582b8bb2 Parents: 493c0a6 Author: Rohit Yadav <rohit.ya...@shapeblue.com> Authored: Fri Aug 8 19:18:32 2014 +0200 Committer: Rohit Yadav <rohit.ya...@shapeblue.com> Committed: Fri Aug 8 19:20:45 2014 +0200 ---------------------------------------------------------------------- tools/appliance/build.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e16414e5/tools/appliance/build.sh ---------------------------------------------------------------------- diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 0d5933f..f29d8bf 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -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