cryptol/cryptol-remote-api/check_docs.sh
Ryan Scott 88c369a271 Autogenerate cryptol-remote-api docs (and check them in CI)
Unfortunately, the autogenerated documentation (now located in `Cryptol.rst`)
doesn't yet have all of the information contained within the hand-written
documentation (now located in `old-Cryptol.rst`—see #1206. In pursuit of
eventually fixing that issue, the CI now makes sure that any changes to the
autogenerated documentation are checked in.
2021-06-01 11:00:26 -04:00

15 lines
364 B
Bash
Executable File

#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/docs
export CRYPTOL_SERVER=$(cabal v2-exec which cryptol-remote-api)
if [[ ! -x "$CRYPTOL_SERVER" ]]; then
echo "could not locate cryptol-remote-api executable - try executing with cabal v2-exec"
exit 1
fi
$CRYPTOL_SERVER doc > TEMP.rst
diff Cryptol.rst TEMP.rst