diff options
| author | Jez Ng | 2012-11-02 23:36:13 -0400 | 
|---|---|---|
| committer | Jez Ng | 2012-11-02 23:36:13 -0400 | 
| commit | 89d3c53fadfd6419c8c6e43af8ace7707deec012 (patch) | |
| tree | 3e67113a08cc4a0b842153e50dcd9f4f875683cc | |
| parent | b704fef5ded1b30c3c8d3d1583738dd6530393ac (diff) | |
| download | vimium-89d3c53fadfd6419c8c6e43af8ace7707deec012.tar.bz2 | |
Fix pre-commit hook.
Previously, we were running the tests based on the working directory
code (instead of using the index), and we did not check that the
generated JS matched the latest Coffeescript.
| -rwxr-xr-x | git_hooks/pre-commit | 12 | 
1 files changed, 10 insertions, 2 deletions
| diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit index 4c618746..f8dacac2 100755 --- a/git_hooks/pre-commit +++ b/git_hooks/pre-commit @@ -1,5 +1,7 @@  #!/bin/sh +echo "Preparing to run tests..." +  TDIR=`mktemp -d -t vimium`  if [ $? -ne 0 ] @@ -8,10 +10,16 @@ then  fi  git checkout-index --prefix=$TDIR/ -af +# because submodules don't get picked up by checkout-index +cp -r ./tests/shoulda.js/ $TDIR/tests/shoulda.js/ -cake test +pushd $TDIR > /dev/null +  cake build +  cake test +  TEST_RESULT=$? +popd -TEST_RESULT=$? +echo "Tests completed."  rm -rf $TDIR | 
