aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJez Ng2012-11-02 23:36:13 -0400
committerJez Ng2012-11-02 23:36:13 -0400
commit89d3c53fadfd6419c8c6e43af8ace7707deec012 (patch)
tree3e67113a08cc4a0b842153e50dcd9f4f875683cc
parentb704fef5ded1b30c3c8d3d1583738dd6530393ac (diff)
downloadvimium-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-xgit_hooks/pre-commit12
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