Created
July 20, 2015 11:57
-
-
Save Stephanvs/34b72c060b113471945d to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# VERSION=1 | |
git status 2&> /dev/null | |
if [ "$?" != "0" ]; then | |
# echo "repo found" | |
# else | |
echo "Git repository not found in current directory" 1>&2 | |
exit 1 | |
fi | |
# 1. retrieve git log | |
# 2. compress it | |
# 3. pipe to remote server for analys | |
git log \ | |
--format="%n%n%an <%ae>%n%n%ci" \ | |
--numstat \ | |
--since=2014-01-01 \ | |
--no-merges \ | |
--date-order | \ | |
gzip | \ | |
curl -s -X PUT \ | |
-H 'Content-type: application/octet-stream' \ | |
-H "Content-Encoding: gzip" \ | |
--data-binary @- \ | |
--compressed "http://gitminer.com/parser/do?version=$VERSION" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment