From: Christophe de Dinechin <dinechin@xxxxxxxxxx> When spice-gtk is a submodule, .git is not a directory but a file. Testing for a file avoids an "UNKNOWN" version Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx> --- build-aux/git-version-gen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 5617eb8..f8e8b23 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,6 +1,6 @@ #!/bin/sh # Print a version string. -scriptversion=2010-06-14.19; # UTC +scriptversion=2018-04-17.14; # UTC # Copyright (C) 2007-2010 Free Software Foundation, Inc. # @@ -98,7 +98,7 @@ fi if test -n "$v" then : # use $v -elif test -d .git \ +elif test -d .git -o -f .git \ && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ || git describe --abbrev=4 HEAD 2>/dev/null` \ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ -- 2.13.5 (Apple Git-94) _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel