third_party/rust/bindgen-0.29.0/ci/deploy-book.sh
author Nick Fitzgerald <fitzgen@gmail.com>
Fri, 01 Sep 2017 16:43:16 -0700
changeset 378421 a8ae266cd61eb004d4f74a989e4d9c6d2ceb5b93
parent 371549 third_party/rust/bindgen/ci/deploy-book.sh@affa66a29e556abeb3ce0370c31ce68c08d7accd
permissions -rwxr-xr-x
Bug 1277338 - Part 13: Update vendored crates for newer `js` crate; r=sfink

#!/usr/bin/env bash

set -xeu
cd "$(dirname "$0")/../book"

# Ensure mdbook is installed.
cargo install mdbook --vers "^0.0.22" || true
export PATH="$PATH:~/.cargo/bin"

# Get the git revision we are on.
rev=$(git rev-parse --short HEAD)

# Build the users guide book and go into the built book's directory.
rm -rf ./book
mdbook build
cd ./book

# Make the built book directory a new git repo, fetch upstream, make a new
# commit on gh-pages, and push it upstream.

git init
git config user.name "Travis CI"
git config user.email "builds@travis-ci.org"

git remote add upstream "https://$GH_TOKEN@github.com/rust-lang-nursery/rust-bindgen.git"
git fetch upstream
git reset upstream/gh-pages

touch .

git add -A .
git commit -m "Rebuild users guide at ${rev}"
git push upstream HEAD:gh-pages