summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2016-01-06 16:35:39 +0100
committerAlex Legler <alex@a3li.li>2016-01-06 16:35:39 +0100
commitdf6924e083a39d095512ed979d97a7d5c632c251 (patch)
treecdb9a9b91ae049d5e6a2ce9d2e217819c458796c /Thanks/scripts
parentAdd new Flow files (diff)
downloadextensions-df6924e083a39d095512ed979d97a7d5c632c251.tar.gz
extensions-df6924e083a39d095512ed979d97a7d5c632c251.tar.bz2
extensions-df6924e083a39d095512ed979d97a7d5c632c251.zip
Add new Thanks files
Diffstat (limited to 'Thanks/scripts')
-rwxr-xr-xThanks/scripts/pre-commit16
1 files changed, 16 insertions, 0 deletions
diff --git a/Thanks/scripts/pre-commit b/Thanks/scripts/pre-commit
new file mode 100755
index 00000000..7badd1fe
--- /dev/null
+++ b/Thanks/scripts/pre-commit
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Enable all the git hooks by executing the following from the project root directory
+# $ make installhooks
+#
+# Code from https://gist.github.com/holysugar/1318698 , simpler than
+# http://stackoverflow.com/a/6262715/451712
+
+# Work out location of Flow/scripts/ directory
+dir=$(dirname $(php -r "echo realpath('$0'), \"\\n\";"))
+# Move to the project root
+cd $(dirname $dir)
+
+find ./ -type f -iname '*.php' -print0 | xargs -0 -P 12 -L 1 php -l
+
+# Run npm test
+npm test