]> git.ipfire.org Git - thirdparty/git.git/blame - ci/test-documentation.sh
refs: print error message in debug output
[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' \
30183894 10 -e "/constant Gem::ConfigMap is deprecated/d" \
37fc8cb1 11 -e '/^ \* new asciidoc flags$/d' \
f6461b82 12 -e '/stripped namespace before processing/d' \
13 -e '/Attributed.*IDs for element/d' \
37fc8cb1
SG
14 "$1"
15}
16
b98712b9
LS
17make check-builtins
18make check-docs
b98712b9 19
159e6010 20# Build docs with AsciiDoc
37fc8cb1
SG
21make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
22cat stderr.raw
23filter_log stderr.raw >stderr.log
24test ! -s stderr.log
b98712b9
LS
25test -s Documentation/git.html
26test -s Documentation/git.xml
27test -s Documentation/git.1
159e6010
LS
28grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
29
37fc8cb1 30rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
31check_unignored_build_artifacts
32
159e6010
LS
33# Build docs with AsciiDoctor
34make clean
37fc8cb1
SG
35make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
36cat stderr.raw
37filter_log stderr.raw >stderr.log
38test ! -s stderr.log
159e6010
LS
39test -s Documentation/git.html
40grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
9cc2c76f 41
37fc8cb1 42rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
43check_unignored_build_artifacts
44
9cc2c76f 45save_good_tree