Skip to content

Commit 505ad91

Browse files
larsxschneidergitster
authored andcommitted
travis-ci: check AsciiDoc/AsciiDoctor stderr output
`make` does not necessarily fail with an error code if Asciidoc/AsciiDoctor encounters problems. Anything written to stderr might be a better indicator for problems. Ensure that nothing is written to stderr during a documentation build. The redirects do not work in `sh`, therefore the script uses `bash`. This shouldn't be a problem as the script is only executed on TravisCI. Signed-off-by: Lars Schneider <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 912b0ab commit 505ad91

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ci/test-documentation.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
# Perform sanity checks on documentation and build it.
44
#
@@ -9,14 +9,17 @@ make check-builtins
99
make check-docs
1010

1111
# Build docs with AsciiDoc
12-
make --jobs=2 doc
12+
make --jobs=2 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
13+
! test -s stderr.log
1314
test -s Documentation/git.html
1415
test -s Documentation/git.xml
1516
test -s Documentation/git.1
1617
grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
1718

1819
# Build docs with AsciiDoctor
1920
make clean
20-
make --jobs=2 USE_ASCIIDOCTOR=1 doc
21+
make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
22+
sed '/^GIT_VERSION = / d' stderr.log
23+
! test -s stderr.log
2124
test -s Documentation/git.html
2225
grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html

0 commit comments

Comments
 (0)