ci / test-documentation.shon commit Merge branch 'dl/rebase-i-keep-base' (640f9cd)
   1#!/usr/bin/env bash
   2#
   3# Perform sanity checks on documentation and build it.
   4#
   5
   6. ${0%/*}/lib.sh
   7
   8filter_log () {
   9        sed -e '/^GIT_VERSION = /d' \
  10            -e '/^    \* new asciidoc flags$/d' \
  11            "$1"
  12}
  13
  14make check-builtins
  15make check-docs
  16
  17# Build docs with AsciiDoc
  18make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
  19cat stderr.raw
  20filter_log stderr.raw >stderr.log
  21test ! -s stderr.log
  22test -s Documentation/git.html
  23test -s Documentation/git.xml
  24test -s Documentation/git.1
  25grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
  26
  27rm -f stdout.log stderr.log stderr.raw
  28check_unignored_build_artifacts
  29
  30# Build docs with AsciiDoctor
  31make clean
  32make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
  33cat stderr.raw
  34filter_log stderr.raw >stderr.log
  35test ! -s stderr.log
  36test -s Documentation/git.html
  37grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
  38
  39rm -f stdout.log stderr.log stderr.raw
  40check_unignored_build_artifacts
  41
  42save_good_tree