]> git.ipfire.org Git - thirdparty/git.git/blame - ci/test-documentation.sh
Merge branch 'bw/format-patch-o-create-leading-dirs'
[thirdparty/git.git] / ci / test-documentation.sh
CommitLineData
505ad913 1#!/usr/bin/env bash
b98712b9
LS
2#
3# Perform sanity checks on documentation and build it.
4#
5
c2160f2d 6. ${0%/*}/lib.sh
657343a6 7
37fc8cb1
SG
8filter_log () {
9 sed -e '/^GIT_VERSION = /d' \
10 -e '/^ \* new asciidoc flags$/d' \
f6461b82 11 -e '/stripped namespace before processing/d' \
12 -e '/Attributed.*IDs for element/d' \
37fc8cb1
SG
13 "$1"
14}
15
b98712b9
LS
16make check-builtins
17make check-docs
b98712b9 18
159e6010 19# Build docs with AsciiDoc
37fc8cb1
SG
20make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
21cat stderr.raw
22filter_log stderr.raw >stderr.log
23test ! -s stderr.log
b98712b9
LS
24test -s Documentation/git.html
25test -s Documentation/git.xml
26test -s Documentation/git.1
159e6010
LS
27grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
28
37fc8cb1 29rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
30check_unignored_build_artifacts
31
159e6010
LS
32# Build docs with AsciiDoctor
33make clean
37fc8cb1
SG
34make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
35cat stderr.raw
36filter_log stderr.raw >stderr.log
37test ! -s stderr.log
159e6010
LS
38test -s Documentation/git.html
39grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
9cc2c76f 40
37fc8cb1 41rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
42check_unignored_build_artifacts
43
9cc2c76f 44save_good_tree