diff options
| author | Franck Cuny <franck.cuny@gmail.com> | 2016-08-10 14:33:04 -0700 |
|---|---|---|
| committer | Franck Cuny <franck.cuny@gmail.com> | 2016-08-10 20:17:56 -0700 |
| commit | 8d7d02f42c3947f756c18cb4d37d9d97fbd0d27d (patch) | |
| tree | a6cecddaaea7e87d901a6c28bebe3a531438f24b /posts/2009-04-14-git-and-prove.org | |
| parent | Merge branch 'convert-to-org' (diff) | |
| download | lumberjaph-8d7d02f42c3947f756c18cb4d37d9d97fbd0d27d.tar.gz | |
convert back to md
Diffstat (limited to '')
| -rw-r--r-- | posts/2009-04-14-git-and-prove.org | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/posts/2009-04-14-git-and-prove.org b/posts/2009-04-14-git-and-prove.org deleted file mode 100644 index 1048f56..0000000 --- a/posts/2009-04-14-git-and-prove.org +++ /dev/null @@ -1,27 +0,0 @@ -A little trick to force you to run your tests before a commit: - -in a repositorie, create the following file *.git/hooks/pre-commit* with -this content: - -#+BEGIN_SRC sh - #!/bin/sh - if [ -d t ]; then - res=`prove t` - if [ $? -gt 0 ]; then - echo "tests fails" - exit 1 - fi - fi - if [ -d xt ]; then - res=`prove xt` - if [ $? -gt 0 ]; then - echo "tests fails" - exit 1 - fi - fi -#+END_SRC - -and don't forget to chmod with +x. - -Now, when you will do your next commit, your test suit will be executed. -If the tests fails, the commit will be rejected. |
