Merge pull request #115 from dlobo/CRM-12088
[civicrm-core.git] / bin / gitify
index 74b17d89e9f77fdb4b21ad0590f02b79cd3bd86d..c17d8eeb626990763423d9a6e59975454d8c0327 100755 (executable)
@@ -39,7 +39,7 @@ function do_hookify() {
   HOOK_DIR="$2"
   if [ -n "$CIVICRM_GIT_HOOKS" ]; then
     echo "[[Install recommended hooks ($TGT)]]"
-    for HOOK in commit-msg post-checkout post-merge pre-commit prepare-commit-msg ;do
+    for HOOK in commit-msg post-checkout post-merge pre-commit prepare-commit-msg post-commit pre-rebase post-rewrite ;do
           cat << TMPL > "$TGT/.git/hooks/$HOOK"
 #!/bin/bash
 if [ -f "\$GIT_DIR/${HOOK_DIR}/${HOOK}" ]; then
@@ -76,6 +76,9 @@ function check_dep() {
     echo "command not found: git"
     exit 3
   fi
+  if [ -z `which php` ]; then
+    echo "command not found: php"
+  fi
 }
 
 #### Main ####
@@ -172,3 +175,12 @@ esac
 if [ "$CIVICRM_L10N" == "--l10n" ]; then
   do_svnify "http://svn.civicrm.org/l10n/trunk" "$CIVICRM_ROOT/l10n"
 fi
+
+pushd "$CIVICRM_ROOT/xml" > /dev/null
+if [ -f "GenCode.php" ]; then
+  echo "[[Generate files]]"
+  php GenCode.php
+else
+  echo "[[Skip \"Generate files\"]]"
+fi
+popd > /dev/null