Skip to content

Instantly share code, notes, and snippets.

@M1ke
Created October 29, 2012 16:17
Show Gist options
  • Save M1ke/3974575 to your computer and use it in GitHub Desktop.
Save M1ke/3974575 to your computer and use it in GitHub Desktop.
Shell file for hooks on Windows with mysysgit installed (includes curl if in path) and powershell code for systems without curl.
$liveCommitClient = new-object System.Net.WebClient;
$liveCommitMessage = git show --format='%s' --name-only HEAD
$liveCommitClient.DownloadFile("http://dashboard.hackmanchester.com/commits?git&message="+ $liveCommitMessage + "&user=73&secret=4aYGnJ3gKotIeUztieyV&files=" , "c:\tmp\null");
echo 0
#!/bin/sh
#
# name as post-commit in a .git/hooks directory
#
# An example hook script that is called after a successful
# commit is made.
#
# To enable this hook, rename this file to "post-commit".
curl -d "output=`git show --format='git&message=%s&user=73&secret=4aYGnJ3gKotIeUztieyV&files=' --name-only HEAD`" http://dashboard.hackmanchester.com/commits
@M1ke
Copy link
Author

M1ke commented Nov 6, 2012

Windows environment variable $TMP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment