Created
March 19, 2009 18:44
-
-
Save adambair/81994 to your computer and use it in GitHub Desktop.
Git post-commit hook for Present.ly (presentlyapp.com)
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/perl | |
# change your account, username, password, and group | |
# it'll run every time you commit (not push, mind you) | |
$account='account'; | |
$username='username'; | |
$password='password'; | |
$group='group'; | |
$git_text = `git log -n1 --pretty=format:"(%h) %s"`; | |
$git_long_text = `git log -n1 --stat`; | |
chomp $git_text; | |
$message = "d $group #commit $git_text"; | |
$api="https://$account.presentlyapp.com/api/twitter/statuses/update.xml"; | |
`curl $api -u $username:$password -d status="$message" -d paste_format='text' -d paste_text='$git_long_text'`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment