Skip to content
Permalink
Browse files

More informative exit message

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 2, 2016
1 parent 8b98ec2 commit 7245ff5891e4e19f585d26e916795217519a27a0
Showing with 7 additions and 5 deletions.
  1. +7 −5 scripts/baseline.sh
@@ -8,7 +8,7 @@ if [[ $PYVER == '3.5' || $PYVER == '2.7' ]]; then
unzip 'v'$PYVER'.zip'
rm -rf baseline$PYVER
mv invariant-builds-$PYVER baseline
rm 'v'$i'.zip'
rm 'v'$PYVER'.zip'
fi
else
echo -e "\033[35m>> Version $PYVER does not support baseline testing.\033[0m"
@@ -20,12 +20,14 @@ cp ../tests/data/1-nolinks.rst posts/1.rst
rm "stories/creating-a-theme.rst" "stories/extending.txt" "stories/internals.txt" "stories/manual.rst" "stories/social_buttons.txt" "stories/theming.rst" "stories/path_handlers.txt" "stories/charts.txt"
LC_ALL='en_US.UTF-8' PYTHONHASHSEED=0 nikola build --invariant
if [[ "$1" == "check" ]]; then
echo "\033[36m>> Testing baseline...\033[0m"
echo -e "\033[36m>> Testing baseline...\033[0m"
diff -ubwr ../baseline output
if [[ $? == 0 ]]; then
echo -e "\033[32;1m>> OK\033[0m"
echo -e "\033[32;1m>> Baseline test successful\033[0m"
else
echo -e "\033[31;1m>> Failed with exit code $?\033[0m"
exit 1
CODE=$?
echo -e "\033[31;1m>> Failed with exit code $CODE\033[0m"
echo "If this change was intentional, the baseline site needs to be rebuilt (maintainers only). Otherwise, please fix this issue."
exit $CODE
fi
fi

0 comments on commit 7245ff5

Please sign in to comment.
You can’t perform that action at this time.