sibanu_web/public/assets/vendor/jekyll/script/proof

25 lines
516 B
Plaintext
Raw Normal View History

2022-08-20 13:21:23 +07:00
#! /bin/bash
#
# Usage:
# script/proof
set -e
if [[ "$1" != "-f" ]]; then
git diff --name-only ..master | grep '^site/' || {
echo "No site files changed. We'll skip proofing. Run with -f to force."
exit 0
}
fi
echo "Some site files have been changed! Proofing..."
command -v htmlproof || {
echo "Installing HTML::Proofer!"
gem install html-proofer -- --use-system-libraries
}
bundle exec jekyll build -s site -d _site --trace
printf "\e[0;36mProofing begins now!\e[0m\n"
htmlproof ./_site