script to replace, eventually if I'm lucky, svnversion as a way to

mark a build's source.
This commit is contained in:
Eric House 2010-06-05 07:20:49 -07:00
parent d91f3de9a9
commit 21fef0ded8

17
xwords4/scripts/gitversion.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
usage() {
echo "usage: $0"
exit 1
}
[ -z "$1" ] || usage
HASH=$(git log -1 --pretty=format:%H)
# mark it with a "+" if anything's changed
if git status --porcelain | grep -q '^[^\?]'; then
HASH="${HASH}+M"
fi
echo $HASH