Last active
October 5, 2017 18:28
-
-
Save joebuhlig/b0c3cd227c148685f98d 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
PATH=$PATH:/usr/local/bin:/usr/local/sbin | |
#!/bin/bash | |
gitbranch=`git rev-parse --abbrev-ref HEAD` | |
if [ $gitbranch = "master" ]; then | |
date=`date +%m/%d/%Y` | |
datetime=`date +%r` | |
gitwa=`git diff HEAD^ HEAD --word-diff=porcelain | grep -e "^+[^+]" | wc -w` | |
gitwd=`git diff HEAD^ HEAD --word-diff=porcelain | grep -e "^-[^-]" | wc -w` | |
commit=`git log -1 --pretty=%B` | |
cnt=`expr $gitwa - $gitwd` | |
theURL='https://script.google.com/a/macros/username/s/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/exec' | |
curl -L --get $theURL --data-urlencode "Date=$date" --data-urlencode "Time=$datetime" --data-urlencode "WordCount=$cnt" --data-urlencode "Commit=$commit" --data-urlencode "Adds=$gitwa" --data-urlencode "Deletes=$gitwd" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment