summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7fffc15)
raw | patch | inline | side by side (parent: 7fffc15)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 18 Oct 2009 18:38:39 +0000 (20:38 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 18 Oct 2009 18:38:39 +0000 (20:38 +0200) |
version-gen.sh | patch | blob | history |
diff --git a/version-gen.sh b/version-gen.sh
index 5b9c1712bb9e6797e2e90de75d4d740c2cf373f5..8797e49673f730de5fdb3380b5c90672e1800264 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
#! /bin/sh
-DEFAULT_VERSION="0.0.0"
+DEFAULT_VERSION="0.0.0.git"
VERSION="$( git describe 2> /dev/null | sed -e 's/foobar-//' )"
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"
+else
+ git update-index -q --refresh
+ if test -n "$( git diff-index --name-only HEAD )"; then
+ VERSION="$VERSION-dirty"
+ fi
fi
VERSION="$( echo "$VERSION" | sed -e 's/-/./g' )"