mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-13 17:48:39 +00:00
Testing hooks
This commit is contained in:
parent
0a7c6a5550
commit
1810a203a9
4
Hooks/delegator.sh
Normal file
4
Hooks/delegator.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. logging.sh
|
||||||
|
. syntax.sh
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
git diff --cached --name-only | while read FILE; do
|
git diff --cached --name-only | while read FILE; do
|
||||||
if [[ "$FILE" =~ ^.+(php|js)$ ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]]; then
|
||||||
RESULT=$(grep "var_dump(" "$FILE")
|
RESULT=$(grep "var_dump(" "$FILE")
|
||||||
if [ ! -z $RESULT ]; then
|
if [ ! -z $RESULT ]; then
|
||||||
echo -e "\e[1;33m\tWarning, the commit contains a call to var_dump(). Commit was not aborted, however.\e[0m" >&2
|
echo -e "\e[1;33m\tWarning, the commit contains a call to var_dump(). Commit was not aborted, however.\e[0m" >&2
|
||||||
|
|
@ -8,7 +10,7 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
git diff --cached --name-only | while read FILE; do
|
git diff --cached --name-only | while read FILE; do
|
||||||
if [[ "$FILE" =~ ^.+(php|js)$ ]]; then
|
if [[ "$FILE" =~ ^.+(js)$ ]]; then
|
||||||
RESULT=$(grep "console.log(" "$FILE")
|
RESULT=$(grep "console.log(" "$FILE")
|
||||||
if [ ! -z $RESULT ]; then
|
if [ ! -z $RESULT ]; then
|
||||||
echo -e "\e[1;33m\tWarning, the commit contains a call to console.log(). Commit was not aborted, however.\e[0m" >&2
|
echo -e "\e[1;33m\tWarning, the commit contains a call to console.log(). Commit was not aborted, however.\e[0m" >&2
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
git diff --cached --name-only | while read FILE; do
|
git diff --cached --name-only | while read FILE; do
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then
|
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user