#!/usr/bin/env bash

## This script is used for testing on Jenkins @ ci.deis.io

set -e # halt script on error
set -x

build_dest=$1

id
ls -ld ${build_dest}

cd /app

echo "Building site..."
/src/script/build ${build_dest}

echo "Checking links..."
bundle exec htmlproofer ${build_dest} --only-4xx --check-html --disable-external --file-ignore "/contact\/index\.html/" || exit 0
