Created
October 29, 2012 16:17
-
-
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.
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
$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 |
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 | |
# | |
# 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 |
Is it possible to get the Windows temp directory out of the Windows environment? That way we don't need to assume it will be on C: drive and in the tmp folder :)
Windows environment variable $TMP
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is awesome @M1ke! Next step would be for me to get it saveable in the source of the dashboard itself (so it interpolates the right user id and domain etc).