Forked from lsolesen/git build-failed file for cijoe
Created
December 9, 2010 08:57
-
-
Save troelskn/734505 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
#!/usr/bin/env bash | |
# Note the use of env. This is because executables may not be placed in the same place on all systems. Notoriously, bsd (and thus mac osx) differs from linux. However, /usr/bin/env always exists in the same place, and it can tell you where other executables are. Thus, the above is good style for portability. | |
COMMIT_VERSION=$(git rev-parse --verify HEAD) | |
# You could also use backticks, but the $() syntax is generally more readable | |
# Convention is to put variables in uppercase in shell script | |
curl -k -u user:password \ | |
-d "to=lsolesen&msg=%22Intraface+build+failed%22&title=Intraface+build+failed&uri=https%3A%2F%2Fgithub.com%2Fintraface%2Fintraface.dk%2Fcommit%2F${COMMIT_VERSION}" \ | |
https://api.notifo.com/v1/send_notification > /dev/null | |
# You can embed a variable in a string, using the ${VAR_NAME} syntax. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment