From: Dan Vanderkam Date: Tue, 21 Oct 2014 14:44:32 +0000 (-0400) Subject: Check that dygraph-combined is un-generated when testing. X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=98cbf4fa8dd4a330f29e10166cf4651b606ce678;p=dygraphs.git Check that dygraph-combined is un-generated when testing. --- diff --git a/Makefile b/Makefile index 18522df..2047c7f 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ generate-gwt: test: @./test.sh + @./check-combined-unaffected.sh test-combined: move-combined test clean-combined-test diff --git a/check-combined-unaffected.sh b/check-combined-unaffected.sh new file mode 100755 index 0000000..de1721e --- /dev/null +++ b/check-combined-unaffected.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Ensures that dygraph-combined.js is unaffected. +# Helpful for pull requests, where this is a common mistake. + +grep 'var' dygraph-combined.js > /dev/null +if [ $? -eq 0 ]; then + echo 'Please revert changes to dygraph-combined.js' >&2 + echo 'You can do this by running: ' >& 2 + echo '' >& 2 + echo ' git checkout dygraph-combined.js' >&2 + echo '' >& 2 + exit 1 +fi + +exit 0