From a3f01d32cba903b58e3ab5a353b4dba8c5431f9c Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Fri, 2 Dec 2022 13:45:37 +0100 Subject: build: restrict `git describe` to top level source directory (#20993) fix version determination when building neovim from release tarball extracted within another git repository --- cmake/GenerateVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/GenerateVersion.cmake b/cmake/GenerateVersion.cmake index 7ce6ee430e..8cea39e4de 100644 --- a/cmake/GenerateVersion.cmake +++ b/cmake/GenerateVersion.cmake @@ -2,7 +2,7 @@ set(NVIM_VERSION "v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}${NVIM_VERSION_PRERELEASE}") execute_process( - COMMAND git describe --first-parent --dirty --always + COMMAND git --git-dir=${NVIM_SOURCE_DIR}/.git --work-tree=${NVIM_SOURCE_DIR} describe --first-parent --dirty --always OUTPUT_VARIABLE GIT_TAG OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE RES) -- cgit