commit 1f0e73241547398fe04df40d0bcba6097162cd75
parent 141081d5435933846d69adefdb96ebcab943cffe
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Tue, 18 Jul 2017 13:20:23 +0200
Generate a zip archive of the HTML and PDF versions, which can be browsed locally.
Diffstat:
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -44,6 +44,8 @@ jobs:
install:
- if test "$TRAVIS_BUILD_ID" != `cat ~/.racket/travis_build_id`; then travis_terminate 1; fi
- rm -f ~/.racket/travis_build_id
+ # Do this before modifying anything in the build folder, to avoid the "x" marker indicating changes since last commit.
+ - zipfile_folder_name="$(racket -e '(begin (require phc-thesis/scribblings/util) (display (version-text "phc-thesis-" "")))')"
- echo "LaTeX extra packages:"
- latex_home=$(kpsewhich -var-value=TEXMFHOME)
- curl -L -o newunicodechar.ins http://mirrors.ctan.org/macros/latex/contrib/newunicodechar/newunicodechar.ins
@@ -71,6 +73,10 @@ jobs:
- patch -p1 < qaligned.patch
- node < run-mathjax-offline.node.js
- mv doc/phc-thesis/index2.html doc/phc-thesis/index.html
+ - mv doc "${zipfile_folder_name}"
+ - zip -r "${zipfile_folder_name}.zip" "${zipfile_folder_name}"
+ - mv "${zipfile_folder_name}" doc
+ - mv "${zipfile_folder_name}.zip" doc/
- if test "x${DEPLOY:-}" = "xtrue"; then sh ./auto-push-gh-pages.sh; fi
- mv ~/.racket ~/.racket-discard
- mkdir ~/.racket # clear the cache
diff --git a/scribblings/phc-thesis.scrbl b/scribblings/phc-thesis.scrbl
@@ -23,15 +23,23 @@
@;@(version-text "Document version: " ".")
@(cond-element
- [html (list "Download a "
- @hyperlink["../pdf/phc-thesis.pdf"]{PDF version}
- " of this document.")]
+ [html @list{Download a @hyperlink["../pdf/phc-thesis.pdf"]{PDF version}
+ of this document.
+
+ Download a @hyperlink[(version-text "../phc-thesis-" ".zip")]{Zip archive}
+ of the HTML and PDF versions of this document.}]
[latex
(list "HTML version available at "
@hyperlink["https://jsmaniac.github.io/phc-thesis/phc-thesis/"
]{https://jsmaniac.github.io/phc-thesis/phc-thesis/}
".")]
- [else ""])
+ [else @list{HTML version: https://jsmaniac.github.io/phc-thesis/phc-thesis/
+
+ PDF version: https://jsmaniac.github.io/phc-thesis/pdf/phc-thesis.pdf
+
+ Zip archive of the HTML and PDF versions:
+ @(version-text "https://jsmaniac.github.io/phc-thesis/phc-thesis-"
+ ".zip")}])
@(table-of-contents)