Skip to content

Commit 0de3404

Browse files
committed
Skip trying to run tests if build fails.
1 parent c0b317a commit 0de3404

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ visitDirectory = (directory, visitor) ->
3131

3232
task "build", "compile all coffeescript files to javascript", ->
3333
coffee = spawn "coffee", ["-c", __dirname]
34+
coffee.on 'exit', (returnCode) -> process.exit returnCode
3435

3536
task "clean", "removes any js files which were compiled from coffeescript", ->
3637
visitDirectory __dirname, (filepath) ->

git_hooks/pre-commit

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ git checkout-index --prefix=$TDIR/ -af
1414
cp -r ./tests/shoulda.js/ $TDIR/tests/shoulda.js/
1515

1616
pushd $TDIR > /dev/null
17-
cake build
18-
cake test
17+
cake build && cake test
1918
TEST_RESULT=$?
2019
popd > /dev/null
2120

0 commit comments

Comments
 (0)