buildhtml.sh should exit with 1 if anything fails (#4773)
* Exit with 1 if anything fails * use set -e instead of checking exit status
Chris Akritidis committed
Nov 28, 2018 at 11:56 UTC
7d3f700bb42ad50513e035c0da796796711e55df
1 file changed
+4
-1
docs/generator/buildhtml.sh
+4
-1
@@ -3,6 +3,9 @@
3
# buildhtml.sh
4
5
# Builds the html static site, using mkdocs
6
+
7
+set -e
8
+
9
# Assumes that the script is executed either from the htmldoc folder (by netlify), or from the root repo dir (as originally intended)
10
currentdir=$(pwd | awk -F '/' '{print $NF}')
11
echo "$currentdir"
@@ -17,6 +20,7 @@ rm -rf ${GENERATOR_DIR}/src
20
find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o -name "*.md" -print | cpio -pd ${GENERATOR_DIR}/src
21
22
# Modify the first line of the main README.md, to enable proper static html generation
23
+echo "Modifying README header"
24
sed -i '0,/# netdata /s//# Introduction\n\n/' ${GENERATOR_DIR}/src/README.md
25
26
# Remove specific files that don't belong in the documentation
@@ -36,7 +40,6 @@ echo "Fixing links"
40
41
# Fix links (recursively, all types, executing replacements)
42
${GENERATOR_DIR}/checklinks.sh -rax
39
-if [ $? -eq 1 ]; then exit 1; fi
43
44
echo "Calling mkdocs"
45