1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/bin/bash
#
# Build docs and choke on gi-docgen warnings
DIR="${1:-_build}"
LOG="${DIR}/doc/doc-build.log"
rm -f "${DIR}"/src/*.gir
meson compile -C "${DIR}" doc/phoc-doc |& tee "${LOG}"
echo "Checking log…"
if grep -vE '('\
'wayland-server-core.h:.* syntax error, unexpected'\
'|argument pressed_keysyms: Unresolved type:'\
'|argument iterator: Unresolved type: .wlr_surface_iterator_func_t.'\
'|argument [a-z_]+: Unresolved type: .pixman_region32_t'\
'|return value: Unresolved type: .pixman_region32_t'\
'|return value: Unresolved type: .cairo_t'\
'|symbol=.cairo_t.'\
')' "${LOG}" | grep -i ' warning:'; then
echo "Found new warning."
exit 1
fi
echo "No new warnings found."
|