Skip to content

Commit

Permalink
Travis: always build docbooks
Browse files Browse the repository at this point in the history
This ensures the builds remain broken if the docbook build fails and a
subsequent commit not affecting the docbook is successful.

Fixes #20471
  • Loading branch information
dregad committed Jan 2, 2016
1 parent d3615f2 commit 0de4e05
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions scripts/travis_script.sh
Expand Up @@ -9,28 +9,15 @@
#
function build_docbook() {

# Get the list of modified docbooks from the commit range
UPDATED_DOCBOOKS=$(
git diff --name-only $TRAVIS_COMMIT_RANGE -- docbook/ |
grep -i '\.xml$' |
cut -d '/' -f 2 |
sort -u
)
DOCBOOKS="Admin_Guide Developers_Guide"

# Build the docbook if any XML files have been updated
if [[ -n $UPDATED_DOCBOOKS ]]
then
# Build the books
for BOOK in $UPDATED_DOCBOOKS
do
echo
echo "Building '$BOOK'..."
cd $TRAVIS_BUILD_DIR/docbook/$BOOK
make
done
else
echo "No documentation changes in $TRAVIS_COMMIT_RANGE"
fi
for BOOK in $DOCBOOKS
do
echo
echo "Building '$BOOK'..."
cd $TRAVIS_BUILD_DIR/docbook/$BOOK
make
done
}


Expand Down

0 comments on commit 0de4e05

Please sign in to comment.