9 # First try git-describe, then see if there is a version file
10 # (included in release tarballs), then default
11 if VN
=$
(git describe
--abbrev=4 HEAD
2>/dev
/null
) &&
14 gitgui-
[0-9]*) : happy
;;
17 VN
=$
(echo "$VN" |
sed -e 's/^gitgui-//;s/-/./g');
20 VN
=$
(cat version
) || VN
="$DEF_VER"
25 dirty
=$
(sh
-c 'git diff-index --name-only HEAD' 2>/dev
/null
) || dirty
=
35 VC
=$
(sed -e 's/^GITGUI_VERSION = //' <$GVF)
39 test "$VN" = "$VC" ||
{
40 echo >&2 "GITGUI_VERSION = $VN"
41 echo "GITGUI_VERSION = $VN" >$GVF