diff --git a/tools/haddock.sh b/tools/haddock.sh new file mode 100755 index 0000000..f31248d --- /dev/null +++ b/tools/haddock.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Creates shallow haddocks for GitHub pages. + +set -eu -o pipefail + +IMAGE_NAME=tensorflow/haskell:v0 +STACK="stack --docker --docker-image=$IMAGE_NAME" + +$STACK haddock --no-haddock-deps tensorflow* +DOC_ROOT=$($STACK path --local-doc-root) +DOCS=docs/haddock +git rm -r $DOCS +mkdir -p $DOCS +cp $DOC_ROOT/{*.html,*js,*.png,*.gif,*.css} $DOCS +cp -a $DOC_ROOT/tensorflow* $DOCS +git add $DOCS