]> git.ipfire.org Git - thirdparty/git.git/blame - ci/test-documentation.sh
The fifth batch
[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 8filter_log () {
4838deab 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' \
f60fec6a 14 -e '/SyntaxWarning: invalid escape sequence/d' \
37fc8cb1
SG
15 "$1"
16}
17
9451446c
PS
18check_docs () {
19 test -s "$1"/Documentation/git.html &&
20 test -s "$1"/Documentation/git.xml &&
21 test -s "$1"/Documentation/git.1 &&
22 grep "<meta name=\"generator\" content=\"$2 " "$1"/Documentation/git.html
23}
24
b98712b9
LS
25make check-builtins
26make check-docs
b98712b9 27
159e6010 28# Build docs with AsciiDoc
37fc8cb1
SG
29make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
30cat stderr.raw
31filter_log stderr.raw >stderr.log
32test ! -s stderr.log
9451446c 33check_docs . AsciiDoc
159e6010 34
37fc8cb1 35rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
36check_unignored_build_artifacts
37
159e6010
LS
38# Build docs with AsciiDoctor
39make clean
37fc8cb1
SG
40make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
41cat stderr.raw
42filter_log stderr.raw >stderr.log
43test ! -s stderr.log
9451446c 44check_docs . Asciidoctor
9cc2c76f 45
37fc8cb1 46rm -f stdout.log stderr.log stderr.raw
b92cb86e
SG
47check_unignored_build_artifacts
48
9451446c
PS
49# Build docs with Meson and AsciiDoc
50meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc
51meson compile -C build-asciidoc
52check_docs build-asciidoc AsciiDoc
53rm -rf build-asciidoc
54
55# Build docs with Meson and AsciiDoctor
56meson setup build-asciidoctor -Ddocs=html,man -Ddocs_backend=asciidoctor
57meson compile -C build-asciidoctor
58check_docs build-asciidoctor Asciidoctor
59rm -rf build-asciidoctor
60
9cc2c76f 61save_good_tree