fetch/clone: detect dubious ownership of local repositories
[git.git] / ci / test-documentation.sh
blobde41888430a260630650341371f9fa6216a4bcbe
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 "/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"
17 make check-builtins
18 make check-docs
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
30 rm -f stdout.log stderr.log stderr.raw
31 check_unignored_build_artifacts
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
42 rm -f stdout.log stderr.log stderr.raw
43 check_unignored_build_artifacts
45 save_good_tree