Skip to content

Commit

Permalink
pre push hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkaklotar committed Oct 6, 2020
1 parent 0da5595 commit bad5144
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
9 changes: 1 addition & 8 deletions contrib/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,4 @@ then
fi
fi

echo "Running Grunt..."
grunt pre-commit
if [ $? -ne 0 ]; then
echo "Grunt failed, please fix code and recommit"
exit 1
fi

exit $?
exit $?
10 changes: 10 additions & 0 deletions contrib/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

echo "Running Grunt..."
grunt pre-commit
if [ $? -ne 0 ]; then
echo "Grunt failed, please fix code and recommit"
exit 1
fi

exit $?
2 changes: 2 additions & 0 deletions contrib/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

cp contrib/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
cp contrib/pre-push .git/hooks/pre-push
chmod +x .git/hooks/pre-push

0 comments on commit bad5144

Please sign in to comment.