perkeep/misc/gitversion

7 lines
147 B
Bash
Executable File

#!/bin/sh
ver=$(git show --pretty=format:'%ad-%h' --abbrev-commit --date=short | head -1)
git diff --exit-code >/dev/null || ver=$ver+
echo $ver