travis-ci: record and skip successfully built trees
[git/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-travisci.sh
7
8 gem install asciidoctor
9
10 make check-builtins
11 make check-docs
12
13 # Build docs with AsciiDoc
14 make --jobs=2 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
15 ! test -s stderr.log
16 test -s Documentation/git.html
17 test -s Documentation/git.xml
18 test -s Documentation/git.1
19 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
20
21 # Build docs with AsciiDoctor
22 make clean
23 make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
24 sed '/^GIT_VERSION = / d' stderr.log
25 ! test -s stderr.log
26 test -s Documentation/git.html
27 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
28
29 save_good_tree