From 98cbf4fa8dd4a330f29e10166cf4651b606ce678 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 21 Oct 2014 10:44:32 -0400 Subject: [PATCH] Check that dygraph-combined is un-generated when testing. --- Makefile | 1 + check-combined-unaffected.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 check-combined-unaffected.sh 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 -- 2.7.4