Merge pull request #11571

This commit is contained in:
Johannes Altmanninger
2025-06-16 12:23:33 +02:00
4 changed files with 42 additions and 33 deletions

View File

@@ -1,33 +0,0 @@
#RUN: fish_indent=%fish_indent fish=%fish %fish %s
#REQUIRES: command -v sphinx-build
set -g tmp_dir (mktemp -d)
function build_docs --argument-names builder
set -l repo_root (status dirname)/../..
set -l docsrc $repo_root/doc_src
set -l doctree $tmp_dir/doctree
set -l output_dir $tmp_dir/$builder
# sphinx-build needs fish_indent in $PATH
set -lxp PATH (path dirname $fish_indent)
sphinx-build \
-j auto \
-q \
-W \
-E \
-b $builder \
-c $docsrc \
-d $doctree \
$docsrc \
$output_dir
end
set -l success true
build_docs man || set -l success false
build_docs html || set -l success false
rm -r $tmp_dir
if test $success = false
exit 1
end

View File

@@ -0,0 +1,7 @@
#RUN: fish_indent=%fish_indent fish=%fish %fish %s
#REQUIRES: command -v sphinx-build
set -l build_script (status dirname)/../test_functions/sphinx-shared.sh
# sphinx-build needs fish_indent in $PATH
set -lxp PATH (path dirname $fish_indent)
$build_script html

View File

@@ -0,0 +1,7 @@
#RUN: fish_indent=%fish_indent fish=%fish %fish %s
#REQUIRES: command -v sphinx-build
set -l build_script (status dirname)/../test_functions/sphinx-shared.sh
# sphinx-build needs fish_indent in $PATH
set -lxp PATH (path dirname $fish_indent)
$build_script man

View File

@@ -0,0 +1,28 @@
#!/bin/sh
set -e
cleanup () {
if [ -n "$tmp_dir" ] && [ -e "$tmp_dir" ]; then
rm -r "$tmp_dir"
fi
}
trap cleanup EXIT INT TERM HUP
repo_root=$(dirname "$0")/../..
builder=$1
docsrc=$repo_root/doc_src
tmp_dir=$(mktemp -d)
doctree=$tmp_dir/doctree
output_dir=$tmp_dir/$builder
sphinx-build \
-j auto \
-q \
-W \
-E \
-b "$builder" \
-c "$docsrc" \
-d "$doctree" \
"$docsrc" \
"$output_dir"