[PATCH spice-gtk] build: Generate correct version when spice-gtk is a submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]