diff --git a/.travis.yml b/.travis.yml index c79d7103..ec249769 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ script: after_script: - mv -i coverage docs ~/gh-pages +- make/make-indexes.sh ~/gh-pages - mkdir -p ~/gh-pages/lib/doc/MathJax - echo 'document.write("<script src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default\"></script>");' > ~/gh-pages/lib/doc/MathJax/MathJax.js - touch ~/gh-pages/.nojekyll diff --git a/graph-lib/make/make-indexes.sh b/graph-lib/make/make-indexes.sh new file mode 100644 index 00000000..543a6707 --- /dev/null +++ b/graph-lib/make/make-indexes.sh @@ -0,0 +1,2 @@ +#!/bin/bash +find "$@" -type d -print0 | xargs -n 1 -r0 bash -c '(shopt -s nullglob; cd "$0"; if (! test -e index.html) || test -e .make-index-html; then touch .make-index-html; echo "<html>" > index.html; for i in */ *.html; do if test "$i" != "index.htm"; then echo "<a href=\"$i\">$i</a>" >> index.html; fi; done; echo "</html>" >> index.html; fi)' diff --git a/graph-lib/make/make.rkt b/graph-lib/make/make.rkt index a5ba0c76..6ba8f600 100644 --- a/graph-lib/make/make.rkt +++ b/graph-lib/make/make.rkt @@ -204,5 +204,12 @@ "-s" "doc" "-s" "test" "-f" "html" - "-f" "coveralls" + ,@(let ([travis (getenv "TRAVIS")]) + (if (and travis (string=? travis "true")) + '("-f" "coveralls") + '())) ,@(exclude-dirs rkt-files (list "make/")))) + +(run! `(,(find-executable-path-or-fail "bash") + "make/make-indexes.sh" + "docs/"))