Created
September 25, 2012 07:16
-
-
Save ssboisen/3780423 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
changedPackageFiles=$(git diff --cached --name-only | grep -i packages.config) | |
grepedCommitMessage=$(grep -i 'Update Packages' $1) | |
if [ -n "$changedPackageFiles" -a -z "$grepedCommitMessage" ] | |
then | |
echo "Aborting commit." | |
echo "Your changing the following packages.config files but you did not confirm this action:" | |
echo "$changedPackageFiles" | |
echo "" | |
echo "Unawarely updating NuGet-packages can introduce unforseen dependency management issues." | |
echo "If your sure you want to modify the packages.config files please include the text 'Update Packages' in the commit message" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment