mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[all] set the working directory for git versioning commands
This commit is contained in:
parent
a94d3734c2
commit
4d8a116849
@ -1,17 +1,14 @@
|
||||
execute_process(COMMAND git describe --always --long --abbrev=10 --tags
|
||||
OUTPUT_VARIABLE GIT_REV
|
||||
ERROR_QUIET)
|
||||
execute_process(
|
||||
COMMAND git describe --always --long --abbrev=10 --tags
|
||||
WORKING_DIRECTORY "${PROJECT_TOP}"
|
||||
OUTPUT_VARIABLE GIT_REV
|
||||
ERROR_QUIET)
|
||||
|
||||
if (NOT "${GIT_REV}" STREQUAL "")
|
||||
execute_process(
|
||||
COMMAND bash -c "git diff --quiet --exit-code || echo +"
|
||||
WORKING_DIRECTORY "${PROJECT_TOP}"
|
||||
OUTPUT_VARIABLE GIT_DIFF)
|
||||
execute_process(
|
||||
COMMAND git describe --exact-match --tags
|
||||
OUTPUT_VARIABLE GIT_TAG ERROR_QUIET)
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
OUTPUT_VARIABLE GIT_BRANCH)
|
||||
|
||||
string(STRIP "${GIT_REV}" GIT_REV)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user