github.com/olivere/camlistore@v0.0.0-20140121221811-1b7ac2da0199/misc/gitversion (about) 1 #!/bin/sh 2 3 ver=$(git show --pretty=format:'%ad-%h' --abbrev-commit --date=short | head -1) 4 git diff --exit-code >/dev/null || ver=$ver+ 5 echo $ver 6