From 8efa6c383709fcfb8871e0168e8aa3f97892e4f4 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 21 Nov 2023 21:53:16 +0100 Subject: [PATCH] build: restrict git describe to top level source directory fix version determination when building mpv from release tarball extracted within another git repository --- common/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/meson.build b/common/meson.build index 4bca5ea435..202880f365 100644 --- a/common/meson.build +++ b/common/meson.build @@ -1,5 +1,8 @@ version_h = vcs_tag( - command: ['git', 'describe', '--always', '--tags', '--dirty'], + command: ['git', + '--git-dir=' + join_paths(source_root, '.git'), + '--work-tree=' + source_root, + 'describe', '--always', '--tags', '--dirty'], input: 'version.h.in', output: 'version.h', replace_string: '@VERSION@',