Files
blog_os/scripts/travis-build.sh
Philipp Oppermann 9830f4ef48 Check rustfmt formatting in travis builds (#210)
* Install rustfmt

* Check formatting in travis builds
2016-08-27 13:45:18 +02:00

24 lines
472 B
Bash

#!/bin/sh
set -e
# build rust project
make
# check formatting (rustfmt)
PATH=~/.cargo/bin:$PATH
cargo fmt -- --write-mode=diff
# clone hugo branch, which contains the blog template
git clone --branch=hugo https://github.com/phil-opp/blog_os.git hugo
cd hugo
# download hugo
wget https://github.com/spf13/hugo/releases/download/v0.15/hugo_0.15_linux_amd64.tar.gz
tar xf hugo_0.15_linux_amd64.tar.gz
# build the blog
hugo_0.15_linux_amd64/hugo_0.15_linux_amd64
cd ..