diff --git a/utils/copy_hooks.sh b/utils/copy_hooks.sh new file mode 100755 index 0000000000000000000000000000000000000000..b27313e780bacf5c6811be42736abc3694cca132 --- /dev/null +++ b/utils/copy_hooks.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# +# Script de mise à jour des hooks client +# +# +# + + +if [ "post-merge" ]; then + if [ -d "../.git/hooks" ]; then + cp -f post-merge ../.git/hooks/post-merge + cp -f pre-push ../.git/hooks/pre-push + fi +fi diff --git a/utils/post-merge b/utils/post-merge new file mode 100755 index 0000000000000000000000000000000000000000..0960111626c0d53350b5ab6ad05fb2ea3a68628e --- /dev/null +++ b/utils/post-merge @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Hook qui permet de push toutes les dépendances +# quand on fait un push sur l'application +# +# +# +# +# + +echo "****** Pre-push Hook ******" +echo "$(pwd)" + +if [ -d "$(pwd)/utils" ]; then + cd utils + ./push_subtrees.sh +fi diff --git a/utils/pre-push b/utils/pre-push new file mode 100755 index 0000000000000000000000000000000000000000..2ebcad449a1a0f942c59fa9b542b02057a98834e --- /dev/null +++ b/utils/pre-push @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Hook qui permet de mettre à jour toutes les dépendances +# quand on fait un pull sur l'application +# +# +# +# +# + +echo "****** Post-merge Hook ******" +echo "$(pwd)" + +if [ -d "$(pwd)/utils" ]; then + cd utils + ./pull_subtrees.sh +fi