Skip to content

Commit

Permalink
Merge pull request #1999 from benjaminapetersen/bpeterse/verify-dist-…
Browse files Browse the repository at this point in the history
…fail-message

Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Sep 1, 2017
2 parents 59d0df1 + 07faf47 commit 5709d8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hack/verify-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -e

RED='\033[0;31m'
NOCOLOR='\033[0m'
GREEN='\033[0;32m'

# We don't need grunt to be installed globally for the system, so
# we can amend our path to look into the local node_modules for the
# correct binaries.
Expand All @@ -12,9 +16,9 @@ grunt build

echo "Verifying that checked in built files under dist match the source..."
if [[ $(git status -s -u dist*) ]]; then
echo -e "${RED}Built /dist does not match what is committed, run 'grunt build' and include the results in your commit.${NOCOLOR}"
git diff --exit-code dist*
echo "Built dist does not match what is committed, run 'grunt build' and include the results in your commit."
exit 1
else
echo "Verified."
echo -e "${GREEN}Verified. Rebuilt /dist matches what has been committed.${NOCOLOR}"
fi

0 comments on commit 5709d8a

Please sign in to comment.