2021-01-10 17:12:49 +00:00
|
|
|
set -e
|
2021-08-24 17:58:55 +00:00
|
|
|
shopt -s globstar
|
2021-01-10 17:12:49 +00:00
|
|
|
startdir=$PWD
|
|
|
|
for file in tests/fixtures/*
|
|
|
|
do
|
|
|
|
cd "$startdir/$file"
|
2021-01-14 05:36:29 +00:00
|
|
|
mkdocs -v build
|
2021-08-24 17:58:55 +00:00
|
|
|
# unfortunately MkDocs writes the run date in the last few lines of index
|
|
|
|
# and has version numbers in some of the scripts that are irrelevant:
|
|
|
|
for hml in **/*.html
|
|
|
|
do
|
|
|
|
grep -v MkDocs.version $hml | grep -v Build.Date.UTC | grep -v '[</]script[ >]' | grep -v '[</]link' > "$hml.cropped"
|
|
|
|
rm $hml
|
|
|
|
done
|
2021-01-10 17:12:49 +00:00
|
|
|
diff -r -x img -x fonts -x js -x '*.xml*' refsite site
|
|
|
|
echo "Site in $file built successfully"
|
|
|
|
rm -r site
|
|
|
|
done
|
|
|
|
echo "All site tests passed."
|