Created
June 28, 2014 11:23
-
-
Save ngs/d251721adde1f0a525a2 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 | |
HIPCHAT_ROOM_ID=$1 | |
HIPCHAT_MESSAGE=$2 | |
HIPCHAT_FROM='Deploy Notifier' | |
RES=$(curl -s https://api.hipchat.com/v1/rooms/message -d "auth_token=$HIPCHAT_TOKEN&room_id=$HIPCHAT_ROOM_ID&from=$HIPCHAT_FROM&message=$HIPCHAT_MESSAGE¬ify=1&message_format=text") | |
if [ $RES = '{"status":"sent"}' ]; then | |
echo "Notification sent to room#$HIPCHAT_ROOM_ID" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment