brent saner 72818c2d5c
v1.0.2
FIXED:
* Dep bumps
* Better docs display on pkg.go.dev
2025-08-28 01:26:04 -04:00

25 lines
544 B
Bash
Executable File

#!/bin/bash
docsdir="${PWD}"
if ! command -v asciidoctor &> /dev/null;
then
exit 0
fi
mkdir -p "${docsdir}"
for f in $(find . -maxdepth 1 -type f -iname "*.adoc"); do
filename=$(basename -- "${f}")
nosuffix="${filename%.*}"
asciidoctor -o "${docsdir}/${nosuffix}.html" "${f}"
git add "${docsdir}/${nosuffix}.html"
if command -v pandoc &> /dev/null;
then
asciidoctor -b docbook -o - "${f}" | pandoc -f docbook -t markdown_strict -o "${docsdir}/${nosuffix}.md"
git add "${docsdir}/${nosuffix}.md"
fi
done
echo "Regenerated docs"