From 7fc9811975b559b94b4686353305effed7b0bb5e Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 25 Aug 2015 14:52:31 +0100 Subject: [PATCH] Use TRAVIS_BRANCH if available --- docs/src/main/asciidoc/ghpages.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index ed9a0005..e1063ce3 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -14,7 +14,8 @@ fi # Find name of current branch ################################################################### -branch=`git rev-parse --abbrev-ref HEAD` +branch=$TRAVIS_BRANCH +[ "$branch" == "" ] && branch=`git rev-parse --abbrev-ref HEAD` target=. if [ "$branch" != "master" ]; then target=./$branch; mkdir -p $target; fi