]> git.ipfire.org Git - thirdparty/git.git/blob - ci/test-documentation.sh
Merge branch 'jt/t5500-unflake'
[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 "/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 "$1"
15 }
16
17 make check-builtins
18 make check-docs
19
20 # Build docs with AsciiDoc
21 make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
22 cat stderr.raw
23 filter_log stderr.raw >stderr.log
24 test ! -s stderr.log
25 test -s Documentation/git.html
26 test -s Documentation/git.xml
27 test -s Documentation/git.1
28 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
29
30 rm -f stdout.log stderr.log stderr.raw
31 check_unignored_build_artifacts
32
33 # Build docs with AsciiDoctor
34 make clean
35 make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
36 cat stderr.raw
37 filter_log stderr.raw >stderr.log
38 test ! -s stderr.log
39 test -s Documentation/git.html
40 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
41
42 rm -f stdout.log stderr.log stderr.raw
43 check_unignored_build_artifacts
44
45 save_good_tree