I\'m using Github, and realized they have a nice little api for accessing repo information like commits, who did it, etc.
This would be a great way to show previous
I'm using this:
function git_func {
GITBIN=/usr/bin/git
if [[ $1 == "commit" ]] && [[ "$#" -ne 1 ]]
then
GIT_VERSION=`$GITBIN rev-list HEAD | wc -l`
let GIT_VERSION+=1
perl -e "s/(\d+\.\d+\.)\d+/\${1}$GIT_VERSION/;" -pi.save config.json
rm config.json.save
fi
GITCMD="$GITBIN "
for var in "$@"
do
GITCMD="$GITCMD \"$var\""
done
eval $GITCMD
}
alias git='git_func'
config.json
contains this:
"version": "0.1.44"