Created
December 18, 2012 15:07
-
-
Save santiycr/4328787 to your computer and use it in GitHub Desktop.
Git commit hook to automatically add your Selenium wiki name to every commit.
This file contains hidden or 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/bash | |
# Automatically adds your Selenium wiki name in case it's missing | |
# Place in selenium/.git/hooks | |
# chmod +x selenium/.git/hooks/commit-msg | |
# Append 'export SELENIUM_WIKI_NAME="YourWikiName"' to your bashrc/zshrc | |
echo "Checking commit message..." | |
if [ -z "$(grep -e "^$SELENIUM_WIKI_NAME: " $1)" ]; then | |
echo "Missing Wiki name in commit message, appending" | |
echo "$SELENIUM_WIKI_NAME: $(cat $1)" > $1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment