Merge branch 'jk/fsmonitor-event-listener-race-fix' into maint-2.47
[git/gitster.git] / ci / test-documentation.sh
blob02b3af394117f840e078479ca60030141e47f998
1 #!/usr/bin/env bash
3 # Perform sanity checks on documentation and build it.
6 . ${0%/*}/lib.sh
8 filter_log () {
9 sed -e '/^GIT_VERSION = /d' \
10 -e "/constant Gem::ConfigMap is deprecated/d" \
11 -e '/^ \* new asciidoc flags$/d' \
12 -e '/stripped namespace before processing/d' \
13 -e '/Attributed.*IDs for element/d' \
14 -e '/SyntaxWarning: invalid escape sequence/d' \
15 "$1"
18 make check-builtins
19 make check-docs
21 # Build docs with AsciiDoc
22 make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
23 cat stderr.raw
24 filter_log stderr.raw >stderr.log
25 test ! -s stderr.log
26 test -s Documentation/git.html
27 test -s Documentation/git.xml
28 test -s Documentation/git.1
29 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
31 rm -f stdout.log stderr.log stderr.raw
32 check_unignored_build_artifacts
34 # Build docs with AsciiDoctor
35 make clean
36 make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
37 cat stderr.raw
38 filter_log stderr.raw >stderr.log
39 test ! -s stderr.log
40 test -s Documentation/git.html
41 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
43 rm -f stdout.log stderr.log stderr.raw
44 check_unignored_build_artifacts
46 save_good_tree