]> git.ipfire.org Git - thirdparty/git.git/blob - ci/test-documentation.sh
be3b7d376ac47391be71a3822a320e327f7a3a2d
[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 test -n "$ALREADY_HAVE_ASCIIDOCTOR" ||
9 gem install asciidoctor
10
11 make check-builtins
12 make check-docs
13
14 # Build docs with AsciiDoc
15 make doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
16 ! test -s stderr.log
17 test -s Documentation/git.html
18 test -s Documentation/git.xml
19 test -s Documentation/git.1
20 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
21
22 rm -f stdout.log stderr.log
23 check_unignored_build_artifacts
24
25 # Build docs with AsciiDoctor
26 make clean
27 make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
28 sed '/^GIT_VERSION = / d' stderr.log
29 ! test -s stderr.log
30 test -s Documentation/git.html
31 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
32
33 rm -f stdout.log stderr.log
34 check_unignored_build_artifacts
35
36 save_good_tree