2016-03-08 17:30:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [ ! -e ./gradlew ]; then
|
|
|
|
echo "Run from the root directory please"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e lib/dokka.jar ]; then
|
|
|
|
echo "Downloading Dokka tool ... "
|
|
|
|
echo
|
2016-05-13 10:50:44 +00:00
|
|
|
wget -O lib/dokka.jar https://github.com/Kotlin/dokka/releases/download/0.9.8/dokka-fatjar.jar
|
2016-03-08 17:30:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Generating docsite ..."
|
|
|
|
echo
|
|
|
|
|
|
|
|
( cd docs; make html )
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Generating API docs ..."
|
|
|
|
echo
|
|
|
|
|
2016-05-23 14:34:00 +00:00
|
|
|
java -jar lib/dokka.jar -output docs/build/html/api core/src/main/kotlin contracts/src/main/kotlin node/src/main/kotlin src/main/kotlin | grep -v "No documentation for"
|
2016-03-08 17:30:33 +00:00
|
|
|
|
|
|
|
echo
|
2016-03-08 17:35:33 +00:00
|
|
|
echo "Writing robots.txt"
|
|
|
|
echo
|
|
|
|
|
|
|
|
cat <<EOF >docs/build/html/robots.txt
|
|
|
|
User-agent: *
|
|
|
|
Disallow: /
|
|
|
|
EOF
|
|
|
|
|
2016-03-08 17:30:33 +00:00
|
|
|
echo "Done"
|