Supply the source directory as working directory when launching Git commands. Should fix retrieving the Git hash on the build machines.

This commit is contained in:
Colin Finck 2017-10-03 15:29:13 +02:00
parent 3d6040615a
commit b9cf2e37f3

View file

@ -29,6 +29,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
if(GIT_FOUND)
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
WORKING_DIRECTORY ${REACTOS_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
RESULT_VARIABLE GIT_CALL_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
@ -39,6 +40,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
execute_process(
COMMAND "${GIT_EXECUTABLE}" describe
WORKING_DIRECTORY ${REACTOS_SOURCE_DIR}
OUTPUT_VARIABLE GIT_DESCRIBE_REVISION
RESULT_VARIABLE GIT_CALL_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE