2 # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3 # file at the top-level directory of this distribution and at
4 # http://rust-lang.org/COPYRIGHT.
6 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 # option. This file may not be copied, modified, or distributed
10 # except according to those terms.
12 set -o errexit
-o nounset
14 export PATH
=$PATH:/home
/travis
/.cargo
/bin
;
16 rev=$
(git rev-parse
--short HEAD
)
18 # make a scratch directory, this will correspond to
19 # https://rust-lang.github.io/book
22 # build the index page into it
23 rustdoc index.md
-o book
/
25 # build the first edition into it
26 mdbook build first-edition
27 mv first-edition
/book book
/first-edition
/
30 # build the second edition into it
31 mdbook build second-edition
32 mv second-edition
/book book
/second-edition
/
34 # move into the book dir and push it
39 git config user.name
"Steve Klabnik"
40 git config user.email
"steve@steveklabnik.com"
42 git remote add upstream
"https://$GH_TOKEN@github.com/rust-lang/book.git"
44 git
reset upstream
/gh-pages
49 git commit
-m "rebuild pages at ${rev}"
50 git push
-q upstream HEAD
:gh-pages
> /dev
/null
2>&1