mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
build: restrict git describe
to top level source directory
fix version determination when building neovim from release tarball
extracted within another git repository
(cherry picked from commit 53ba7b9a5a
)
This commit is contained in:
parent
346f77c5a6
commit
4bef100e47
@ -2,7 +2,7 @@ set(NVIM_VERSION
|
|||||||
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}${NVIM_VERSION_PRERELEASE}")
|
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}${NVIM_VERSION_PRERELEASE}")
|
||||||
|
|
||||||
execute_process(
|
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_VARIABLE GIT_TAG
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
RESULT_VARIABLE RES)
|
RESULT_VARIABLE RES)
|
||||||
|
@ -206,6 +206,7 @@ add_custom_target(update_version_stamp
|
|||||||
-DNVIM_VERSION_PATCH=${NVIM_VERSION_PATCH}
|
-DNVIM_VERSION_PATCH=${NVIM_VERSION_PATCH}
|
||||||
-DNVIM_VERSION_PRERELEASE=${NVIM_VERSION_PRERELEASE}
|
-DNVIM_VERSION_PRERELEASE=${NVIM_VERSION_PRERELEASE}
|
||||||
-DOUTPUT=${NVIM_VERSION_GIT_H}
|
-DOUTPUT=${NVIM_VERSION_GIT_H}
|
||||||
|
-DNVIM_SOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||||
-P ${PROJECT_SOURCE_DIR}/cmake/GenerateVersion.cmake
|
-P ${PROJECT_SOURCE_DIR}/cmake/GenerateVersion.cmake
|
||||||
BYPRODUCTS ${NVIM_VERSION_GIT_H})
|
BYPRODUCTS ${NVIM_VERSION_GIT_H})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user