[Spice-devel] [PATCH spice-gtk] build: Generate correct version when spice-gtk is a submodule
Christophe Fergeau
cfergeau at redhat.com
Wed Apr 18 14:43:14 UTC 2018
Hey,
This script comes from https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=build-aux/git-version-gen;h=6d073fcaddd827a396af4c52f1bf00bdd84a9f66;hb=HEAD
where this issue might already be fixed, the line that you changed seems
to be replaced by:
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
So I'd suggest updating the script to the latest version if this fixes
the problem that you were seeing.
Christophe
On Wed, Apr 18, 2018 at 04:22:23PM +0200, Christophe de Dinechin wrote:
> From: Christophe de Dinechin <dinechin at redhat.com>
>
> 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 at redhat.com>
> ---
> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180418/ef8633c6/attachment.sig>
More information about the Spice-devel
mailing list