Skip to content

Commit

Permalink
post-merge git hook to notify if a requirements changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sravfeyn committed Mar 5, 2015
1 parent b12a793 commit 39a8197
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions git-hooks/post-merge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Notify if requirements files are changed
CHANGED=`git diff HEAD@{1} --stat -- $GIT_DIR/../requirements/ | wc -l`
if [ $CHANGED -gt 0 ];
then
echo "Requirements files changed"
git diff HEAD@{1} -- ./requirements/
echo "You might want to update your environment as per above requirements changes"
fi

0 comments on commit 39a8197

Please sign in to comment.