From 610bb98eabf6941d2d5d63331f0ea396df9db36c Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Mon, 9 Jul 2018 14:26:11 +0300 Subject: [PATCH] Explicitly fail if there are errors during docs build --- docs/build.sh | 3 ++- docs/concatenate.py | 2 +- docs/mkdocs_en.yml | 1 + docs/mkdocs_en_single_page.yml | 1 + docs/mkdocs_ru.yml | 1 + docs/mkdocs_ru_single_page.yml | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/build.sh b/docs/build.sh index 17ebfbc32e3..e19499aedab 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e if [ $# -lt 1 ]; then LANGS="ru en" @@ -8,7 +9,7 @@ fi for lang in $LANGS; do echo -e "\n\nLANG=$lang. Creating single page source" - mkdir $lang'_single_page' 2>/dev/null + mkdir $lang'_single_page' 2>/dev/null || true cp -r $lang/images $lang'_single_page' ./concatenate.py $lang echo -e "\n\nLANG=$lang. Building multipage..." diff --git a/docs/concatenate.py b/docs/concatenate.py index ba803ee09a3..589cda86151 100755 --- a/docs/concatenate.py +++ b/docs/concatenate.py @@ -68,7 +68,7 @@ for path in files_to_concatenate: if sharp_pos > -1: return '[' + text + '](' + link[sharp_pos:] + ')' else: - print('ERROR: Link [' + text + '](' + link + ') in file ' + path + ' has no anchor. Please provide it.') + raise RuntimeError('ERROR: Link [' + text + '](' + link + ') in file ' + path + ' has no anchor. Please provide it.') # return '['+text+'](#'+link.replace('/','-')+')' for l in file: diff --git a/docs/mkdocs_en.yml b/docs/mkdocs_en.yml index 1b19baf630f..6714035db8b 100644 --- a/docs/mkdocs_en.yml +++ b/docs/mkdocs_en.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 Yandex LLC docs_dir: en site_dir: build/docs/en use_directory_urls: true +strict: true repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' diff --git a/docs/mkdocs_en_single_page.yml b/docs/mkdocs_en_single_page.yml index 416993ed072..7173e4353ec 100644 --- a/docs/mkdocs_en_single_page.yml +++ b/docs/mkdocs_en_single_page.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 Yandex LLC docs_dir: en_single_page site_dir: build/docs/en/single use_directory_urls: false +strict: true repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' diff --git a/docs/mkdocs_ru.yml b/docs/mkdocs_ru.yml index 7bc70245bad..2b3e7310948 100644 --- a/docs/mkdocs_ru.yml +++ b/docs/mkdocs_ru.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 Yandex LLC docs_dir: ru site_dir: build/docs/ru use_directory_urls: true +strict: true repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' diff --git a/docs/mkdocs_ru_single_page.yml b/docs/mkdocs_ru_single_page.yml index c66c4716eda..9b314177b60 100644 --- a/docs/mkdocs_ru_single_page.yml +++ b/docs/mkdocs_ru_single_page.yml @@ -4,6 +4,7 @@ copyright: ©2016–2018 Yandex LLC docs_dir: ru_single_page site_dir: build/docs/ru/single use_directory_urls: false +strict: true repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/'