-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-nightlies
executable file
·31 lines (22 loc) · 1.56 KB
/
build-nightlies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
VERSION="$(git describe | sed s/first-edition-//)"
DATE="$(date +"%B %-d, %Y")"
VERSION_MARKER="$(git describe)"
PDF_TARGETS="hott-online hott-ebook hott-letter hott-a4 errata"
# the travis script looks for lines of the form 'NIGHTLY: ...' and scrapes the file names from these
for TARGET in $PDF_TARGETS; do
make "$TARGET.pdf" && mv -f "$TARGET.pdf" "$TARGET-$VERSION.pdf" && echo "NIGHTLY: $TARGET-$VERSION.pdf"
done
echo "$VERSION" > version && echo "NIGHTLY: version"
# update the linking page
cat > Nightly-Builds.md <<EOF
<!--- This page is auto-generated by travis. To update this page; update the build-nightlies script. --->
Below are links to "nightly builds" of the book, incorporating fixes and improvements that have not yet been incorporated into the "released version" that can be found on the [official book web site](http://homotopytypetheory.org/book/). The nightly builds are updated automatically by Travis CI; their most recent update was on $DATE and their version marker is "$VERSION_MARKER".
* [PDF for on-screen viewing](//hott.github.io/book/nightly/hott-online-$VERSION.pdf)
* [PDF for e-book readers](//hott.github.io/book/nightly/hott-ebook-$VERSION.pdf)
* [PDF for printing on letter paper](//hott.github.io/book/nightly/hott-letter-$VERSION.pdf)
* [PDF for printing on A4 paper](//hott.github.io/book/nightly/hott-a4-$VERSION.pdf)
* [errata for previous versions](//hott.github.io/book/nightly/errata-$VERSION.pdf)
EOF
# the travis script looks for a line of the form NIGHTLY-WIKI: to find the file name
echo 'NIGHTLY-WIKI: Nightly-Builds.md'