t7800: don't rely on reuse_worktree_file()
[git.git] / ci / test-documentation.sh
blobb3e76ef8634820646f2e2fc4b4e9b5cc2d4b97ce
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 -e '/stripped namespace before processing/d' \
12 -e '/Attributed.*IDs for element/d' \
13 "$1"
16 make check-builtins
17 make check-docs
19 # Build docs with AsciiDoc
20 make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
21 cat stderr.raw
22 filter_log stderr.raw >stderr.log
23 test ! -s stderr.log
24 test -s Documentation/git.html
25 test -s Documentation/git.xml
26 test -s Documentation/git.1
27 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
29 rm -f stdout.log stderr.log stderr.raw
30 check_unignored_build_artifacts
32 # Build docs with AsciiDoctor
33 make clean
34 make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
35 cat stderr.raw
36 filter_log stderr.raw >stderr.log
37 test ! -s stderr.log
38 test -s Documentation/git.html
39 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
41 rm -f stdout.log stderr.log stderr.raw
42 check_unignored_build_artifacts
44 save_good_tree