generate-docs 583 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. # Kludged documentation generator to support multiple versions.
  3. set -e
  4. CHECKOUT="$(mktemp -d)"
  5. OUTPUT="$(pwd)/dist/docs"
  6. npm run-script build
  7. cd dist
  8. echo "rojo.space" > CNAME
  9. rm -rf docs
  10. mkdir docs
  11. cp ../bin/docs-index.html docs/index.html
  12. git clone https://github.com/rojo-rbx/rojo.git "$CHECKOUT"
  13. cd "$CHECKOUT"
  14. echo "Building master"
  15. git checkout master
  16. mkdocs build --site-dir "$OUTPUT/latest"
  17. echo "Building 0.5.x"
  18. git checkout v0.5.x
  19. mkdocs build --site-dir "$OUTPUT/0.5.x"
  20. echo "Building 0.4.x"
  21. git checkout v0.4.x
  22. mkdocs build --site-dir "$OUTPUT/0.4.x"