Cleaning up the cibuild stuff.
This commit is contained in:
parent
9d07a97945
commit
ab66326f97
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
script/branding
|
script/branding
|
||||||
script/proof
|
script/proof
|
||||||
bundle exec rake
|
script/test
|
||||||
|
|
29
script/proof
29
script/proof
|
@ -1,19 +1,20 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# script/proof
|
||||||
|
|
||||||
# Check if any site files have changed
|
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep '^/site' || {
|
||||||
if [[ $(git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep '^/site') == "" ]]; then
|
echo "No site files changed. We'll skip proofing."
|
||||||
echo "No site files changed"
|
exit 0
|
||||||
exit 0
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
# Site files have been changed, continue
|
echo "Some site files have been changed! Proofing..."
|
||||||
echo "Site files have been changed, proofing"
|
|
||||||
if ! [[ $(command -v htmlproof) ]]; then
|
|
||||||
echo "Installing HTML::Proofer"
|
|
||||||
gem install html-proofer -- --use-system-libraries
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\nGenerating site... "
|
command -v htmlproof || {
|
||||||
jekyll build -s site -d _site -q
|
echo "Installing HTML::Proofer!"
|
||||||
printf "done.\n\n\e[0;36mProofing begins now!\e[0m\n"
|
gem install html-proofer -- --use-system-libraries
|
||||||
|
}
|
||||||
|
|
||||||
|
jekyll build -s site -d _site --trace
|
||||||
|
echo -e "\e[0;36mProofing begins now!\e[0m\n"
|
||||||
htmlproof ./_site
|
htmlproof ./_site
|
||||||
|
|
13
script/test
13
script/test
|
@ -1,11 +1,20 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# script/test
|
||||||
|
# script/test <hi>
|
||||||
|
|
||||||
set -x
|
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep -v '^/site' || {
|
||||||
|
echo "No lib files have changed, skipping Jekyll tests!"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
TEST_FILES="test/test*.rb"
|
TEST_FILES="test/test_*.rb"
|
||||||
else
|
else
|
||||||
TEST_FILES="$@"
|
TEST_FILES="$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
/usr/bin/env bundle exec ruby -I"lib:test" -r rake -r rake/rake_test_loader ${TEST_FILES}
|
/usr/bin/env bundle exec ruby -I"lib:test" -r rake -r rake/rake_test_loader ${TEST_FILES}
|
||||||
|
|
Loading…
Reference in New Issue