Skip to content
Snippets Groups Projects
Commit fd1a9a8f authored by Armand Bahi's avatar Armand Bahi
Browse files

Automaticaly copy git hooks

parent 15a03d30
Branches
Tags
No related merge requests found
......@@ -7,9 +7,8 @@
#
if [ "post-merge" ]; then
if [ -d "githooks" ]; then
if [ -d "../.git/hooks" ]; then
cp -f post-merge ../.git/hooks/post-merge
cp -f pre-push ../.git/hooks/pre-push
cp -f githooks/* ../.git/hooks/
fi
fi
#!/bin/sh
#
# Hook qui permet de mettre à jour toutes les dépendances
# Hook qui permet de pull toutes les dépendances
# quand on fait un pull sur l'application
#
#
......@@ -8,7 +8,8 @@
#
#
echo "****** Pre-push Hook ******"
echo "****** Post-merge Hook ******"
echo "****** Pull subtrees ******"
echo "$(pwd)"
if [ -d "$(pwd)/utils" ]; then
......
......@@ -8,10 +8,14 @@
#
#
echo "****** Post-merge Hook ******"
echo "$(pwd)"
remote="$1"
url="$2"
if [ $remote != $url ]; then
echo "****** Pre-push Hook ******"
echo "****** Push subtrees ******"
if [ -d "$(pwd)/utils" ]; then
cd utils
./push_subtrees.sh
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment