Merge branch 'ds/object-info-for-prefetch-fix'
[git/raj.git] / ci / test-documentation.sh
blobd49089832de08f2fcefa1a8b2c45bb668964356a
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 '/^ \* new asciidoc flags$/d' \
11 "$1"
14 make check-builtins
15 make check-docs
17 # Build docs with AsciiDoc
18 make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
19 cat stderr.raw
20 filter_log stderr.raw >stderr.log
21 test ! -s stderr.log
22 test -s Documentation/git.html
23 test -s Documentation/git.xml
24 test -s Documentation/git.1
25 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
27 rm -f stdout.log stderr.log stderr.raw
28 check_unignored_build_artifacts
30 # Build docs with AsciiDoctor
31 make clean
32 make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
33 cat stderr.raw
34 filter_log stderr.raw >stderr.log
35 test ! -s stderr.log
36 test -s Documentation/git.html
37 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
39 rm -f stdout.log stderr.log stderr.raw
40 check_unignored_build_artifacts
42 save_good_tree