]>
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' \ | |
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 |
17 | make check-builtins |
18 | make check-docs | |
b98712b9 | 19 | |
159e6010 | 20 | # Build docs with AsciiDoc |
37fc8cb1 SG |
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 | |
b98712b9 LS |
25 | test -s Documentation/git.html |
26 | test -s Documentation/git.xml | |
27 | test -s Documentation/git.1 | |
159e6010 LS |
28 | grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html |
29 | ||
37fc8cb1 | 30 | rm -f stdout.log stderr.log stderr.raw |
b92cb86e SG |
31 | check_unignored_build_artifacts |
32 | ||
159e6010 LS |
33 | # Build docs with AsciiDoctor |
34 | make clean | |
37fc8cb1 SG |
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 | |
159e6010 LS |
39 | test -s Documentation/git.html |
40 | grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html | |
9cc2c76f | 41 | |
37fc8cb1 | 42 | rm -f stdout.log stderr.log stderr.raw |
b92cb86e SG |
43 | check_unignored_build_artifacts |
44 | ||
9cc2c76f | 45 | save_good_tree |