]>
Commit | Line | Data |
---|---|---|
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 |
8 | filter_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 |
16 | make check-builtins |
17 | make check-docs | |
b98712b9 | 18 | |
159e6010 | 19 | # Build docs with AsciiDoc |
37fc8cb1 SG |
20 | make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2) |
21 | cat stderr.raw | |
22 | filter_log stderr.raw >stderr.log | |
23 | test ! -s stderr.log | |
b98712b9 LS |
24 | test -s Documentation/git.html |
25 | test -s Documentation/git.xml | |
26 | test -s Documentation/git.1 | |
159e6010 LS |
27 | grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html |
28 | ||
37fc8cb1 | 29 | rm -f stdout.log stderr.log stderr.raw |
b92cb86e SG |
30 | check_unignored_build_artifacts |
31 | ||
159e6010 LS |
32 | # Build docs with AsciiDoctor |
33 | make clean | |
37fc8cb1 SG |
34 | make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2) |
35 | cat stderr.raw | |
36 | filter_log stderr.raw >stderr.log | |
37 | test ! -s stderr.log | |
159e6010 LS |
38 | test -s Documentation/git.html |
39 | grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html | |
9cc2c76f | 40 | |
37fc8cb1 | 41 | rm -f stdout.log stderr.log stderr.raw |
b92cb86e SG |
42 | check_unignored_build_artifacts |
43 | ||
9cc2c76f | 44 | save_good_tree |