]> git.ipfire.org Git - thirdparty/git.git/blob - ci/test-documentation.sh
Merge branch 'bw/format-patch-o-create-leading-dirs'
[thirdparty/git.git] / ci / test-documentation.sh
1 #!/usr/bin/env bash
2 #
3 # Perform sanity checks on documentation and build it.
4 #
5
6 . ${0%/*}/lib.sh
7
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"
14 }
15
16 make check-builtins
17 make check-docs
18
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
28
29 rm -f stdout.log stderr.log stderr.raw
30 check_unignored_build_artifacts
31
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
40
41 rm -f stdout.log stderr.log stderr.raw
42 check_unignored_build_artifacts
43
44 save_good_tree