summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-02-12 21:38:29 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-02-12 21:38:29 (GMT)
commit6a6459bc8f1aa9e83b5b46f7c40454891bf5e92a (patch)
tree595e473cf4f2dde8dec6c270e413c759458e09c8 /GIT-VERSION-GEN
parent5d643cd3cebf5eab44d99c5c7e54a1dbef28cba6 (diff)
downloadgit-6a6459bc8f1aa9e83b5b46f7c40454891bf5e92a.zip
git-6a6459bc8f1aa9e83b5b46f7c40454891bf5e92a.tar.gz
git-6a6459bc8f1aa9e83b5b46f7c40454891bf5e92a.tar.bz2
git-gui: Handle gitgui tags in version gen.
I've decided to use gitgui-0.5 as the format for tags in the git-gui repository. The prefix of gitgui was chosen here to make its namespace different from the namespace used by git itself, allowing developers to pull both tag namespaces into the same repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN8
1 files changed, 3 insertions, 5 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 79558f3..d308748 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
-DEF_VER=v0.5.GIT
+DEF_VER=0.5.GIT
LF='
'
@@ -11,10 +11,10 @@ LF='
if VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
- v[0-9]*) : happy ;;
+ gitgui-[0-9]*) : happy ;;
esac
then
- VN=$(echo "$VN" | sed -e 's/-/./g');
+ VN=$(echo "$VN" | sed -e 's/^gitgui-//;s/-/./g');
elif test -f version
then
VN=$(cat version) || VN="$DEF_VER"
@@ -22,8 +22,6 @@ else
VN="$DEF_VER"
fi
-VN=$(expr "$VN" : v*'\(.*\)')
-
dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
case "$dirty" in
'')