Skip to content
Permalink
Browse files

Add logging and color to deploy script (#477)

This change makes errors in parsing the spec source files more visible
by adding more verbose logging with color.
  • Loading branch information
odejesush committed Feb 21, 2020
1 parent 4580caa commit 695d9c2d4a46d78357cf17817f220d2f3896c057
Showing with 6 additions and 2 deletions.
  1. +6 −2 deploy.sh
@@ -4,11 +4,15 @@ set -e # Exit with nonzero exit code if anything fails.
SOURCE_BRANCH="master"
TARGET_BRANCH="gh-pages"

COLOR_RED="\e[31m"
COLOR_DEFAULT="\e[39m"

for SPEC in $SPECS; do
echo ${SPEC}.bs:
echo "Parsing ${SPEC}.bs:"
ERR=$(curl https://api.csswg.org/bikeshed/ -f -F file=@${SPEC}.bs -F output=err)
if [ -n "$ERR" ]; then
echo "$ERR"
echo -e "${COLOR_RED}Error occurred while parsing ${SPEC}.bs:${COLOR_DEFAULT}"
echo -e "$ERR"
exit 1
fi
done

0 comments on commit 695d9c2

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