2016-10-25 19:11:24 +02:00
|
|
|
#!/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
|
2016-10-25 21:43:06 +02:00
|
|
|
git rm -fr $DOCS
|
2016-10-25 19:11:24 +02:00
|
|
|
mkdir -p $DOCS
|
|
|
|
cp $DOC_ROOT/{*.html,*js,*.png,*.gif,*.css} $DOCS
|
|
|
|
cp -a $DOC_ROOT/tensorflow* $DOCS
|
2016-10-25 21:43:06 +02:00
|
|
|
rm -f $DOCS/*/*.haddock
|
2018-08-15 05:06:46 +02:00
|
|
|
ln -s $DOCS/tensorflow-* $DOCS/tensorflow
|
2016-10-25 19:11:24 +02:00
|
|
|
git add $DOCS
|