Add echo's to deploy script

This commit is contained in:
Mathieu David 2015-08-06 13:06:26 +02:00
parent 726018307e
commit e0621ed0c7
1 changed files with 12 additions and 2 deletions

View File

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