diff --git a/bin/doc-tools-check-languages b/bin/doc-tools-check-languages index 47f35d6c..55f5d4a8 100755 --- a/bin/doc-tools-check-languages +++ b/bin/doc-tools-check-languages @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -xe # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -BUILD_FAIL=0 INSTALL_TAGS="obs rdo ubuntu debian debconf" FIRSTAPP_TAGS="libcloud dotnet fog openstacksdk pkgcloud shade" @@ -23,6 +22,7 @@ MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID" function build_rst { language=$1 book=$2 + local ret # First build all the single po files # Note that we need to run inside a venv since the venv we are run in @@ -72,8 +72,11 @@ function build_rst { done # Set the bug project to I18n project + set +e grep 'bug_project' ${DOC_DIR}${book}/source/conf.py > /dev/null - if [ "$?" -eq 0 ] ; then + ret=$? + set -e + if [ "$ret" -eq 0 ] ; then # Replace the existing "bug_project" html context sed -i -e \ 's/"bug_project" *: *[^ ,}]*/"bug_project": "openstack-i18n"/' \ @@ -205,12 +208,6 @@ function test_language { if [ ${SPECIAL_BOOKS[$book]} = "RST" ] ; then echo "Building translated RST book $book for $language" build_rst $language $book - if [[ $? -eq 0 ]] ; then - echo "... succeeded" - else - echo "... failed" - BUILD_FAIL=1 - fi continue fi fi @@ -324,7 +321,6 @@ for language in "$@" ; do handle_draft_language $language fi else - BUILD_FAIL=1 echo "Error: language $language not handled" fi ;; @@ -332,4 +328,4 @@ for language in "$@" ; do done -exit $BUILD_FAIL +exit 0