Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
pre-push hook to run tests
Browse files Browse the repository at this point in the history
Adds a note on how to use Git hooks to the README.
  • Loading branch information
garrettr committed Feb 19, 2014
1 parent 7256f62 commit 0380b6e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Expand Up @@ -5,4 +5,13 @@ Privacy Badger for Firefox

1. Install addon-sdk [github](https://github.com/mozilla/addon-sdk)
2. [Addon-sdk documentation] (https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation)
2. cfx run
3. cfx run

Contributing
============

Git hooks
---------

Are in `hooks/`. You can use them by copying the files to `.git/hooks`. The
pre-push hook will run the unit tests, and cancel the push if they fail.
12 changes: 12 additions & 0 deletions hooks/pre-push
@@ -0,0 +1,12 @@
#!/bin/bash

# Pre-push hook. If you want to test with a different version of firefox, put
# the path in the CFX_FIREFOX environment variable.

cmd='cfx test'
if [ -n "$CFX_FIREFOX" ];
then
cmd="$cmd -b $CFX_FIREFOX"
fi
echo $cmd
$cmd

0 comments on commit 0380b6e

Please sign in to comment.