Don't generate docs if we can't determine a Git branch

This commit is contained in:
Blake Watters
2013-02-07 11:54:54 -05:00
parent 7416a0f19c
commit 1add8f5410

View File

@@ -20,6 +20,8 @@ rake server:stop
# Build & Publish Docs
if [ -n $DOCS_DESTINATION ]; then
VERSION=`echo $GIT_BRANCH|sed -e 's/origin\///'`
echo "Building documentation for branch $VERSION and publishing to '$DOCS_DESTINATION'"
rake docs:publish[$VERSION,$DOCS_DESTINATION]
if [ -n $VERSION ]; then
echo "Building documentation for branch $VERSION and publishing to '$DOCS_DESTINATION'"
rake docs:publish[$VERSION,$DOCS_DESTINATION]
fi
fi