docs.sh 609 Bytes
Newer Older
1
#!/bin/bash
2
set -e
3 4 5 6 7 8

# Install dartdoc.
pub global activate dartdoc

# Generate flutter docs into dev/docs/doc/api/.
(cd dev/tools; pub get)
Seth Ladd's avatar
Seth Ladd committed
9 10 11

# This script generates a unified doc set, and creates
# a custom index.html, placing everything into dev/docs/doc
12 13
dart dev/tools/dartdoc.dart

Seth Ladd's avatar
Seth Ladd committed
14 15
# Ensure google webmaster tools can verify our site.
cp dev/docs/google2ed1af765c529f57.html dev/docs/doc
16

17 18 19 20 21 22 23 24
# Upload new API docs when on Travis and branch is master

if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
  if [ "$TRAVIS_BRANCH" = "master" ]; then
    cd dev/docs
    firebase deploy --project docs-flutter-io
  fi
fi