Fix colors in deploy script + Fix link to API docs

This commit is contained in:
Mathieu David 2015-08-06 13:30:08 +02:00
parent 77413e4699
commit fd57d03992
2 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
# Rust Library
Check here for the [API docs](mdbook/index.html) generated by rustdoc
Check here for the [API docs](../mdbook/index.html) generated by rustdoc
mdBook is not only a command line tool, it can be used as a crate. You can extend it,
integrate it in current projects. Here is a short example:

View File

@ -3,27 +3,27 @@
# Exit on error or variable unset
set -o errexit -o nounset
NC='\e[39m'
CYAN='\e[36m'
GREEN='\e[32m'
NC='\033[39m'
CYAN='\033[36m'
GREEN='\033[32m'
rev=$(git rev-parse --short HEAD)
echo "${CYAN}Running cargo doc${NC}"
echo -e "${CYAN}Running cargo doc${NC}"
# Run cargo doc
cargo doc
echo "${CYAN}Running mdbook build${NC}"
echo -e "${CYAN}Running mdbook build${NC}"
# Run mdbook to generate the book
target/debug/mdbook build book-example/
echo "${CYAN}Copying book to target/doc${NC}"
echo -e "${CYAN}Copying book to target/doc${NC}"
# Copy files from rendered book to doc root
cp -R book-example/book/* target/doc/
cd target/doc
echo "${CYAN}Initializing Git${NC}"
echo -e "${CYAN}Initializing Git${NC}"
git init
git config user.name "Mathieu David"
git config user.email "mathieudavid@mathieudavid.org"
@ -34,9 +34,9 @@ git reset upstream/gh-pages
touch .
echo "${CYAN}Pushing changes to gh-pages${NC}"
echo -e "${CYAN}Pushing changes to gh-pages${NC}"
git add -A .
git commit -m "rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages
echo "${GREEN}Deployement done${NC}"
echo -e "${GREEN}Deployement done${NC}"