Report the branch & state rather than last tag in dev version string.
This commit is contained in:
parent
86665944f6
commit
b1493275e5
1 changed files with 2 additions and 2 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
if (VERSION MATCHES "-dev$")
|
if (VERSION MATCHES "-dev$")
|
||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
if (GIT_FOUND)
|
if (GIT_FOUND)
|
||||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags
|
execute_process(COMMAND ${GIT_EXECUTABLE} describe --all --long --dirty
|
||||||
WORKING_DIRECTORY ${SRC_DIR}
|
WORKING_DIRECTORY ${SRC_DIR}
|
||||||
OUTPUT_VARIABLE "GIT_VERSION"
|
OUTPUT_VARIABLE "GIT_VERSION"
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
ERROR_QUIET)
|
ERROR_QUIET)
|
||||||
string(REGEX REPLACE "^geary-([0-9\\.]*)-([0-9]*)-(.*)" "\\1+\\2~\\3" GIT_VERSION "${GIT_VERSION}")
|
string(REGEX REPLACE "^heads\\/(.*)-0-(g.*)$" "\\1~\\2" GIT_VERSION "${GIT_VERSION}")
|
||||||
set(VERSION ${GIT_VERSION})
|
set(VERSION ${GIT_VERSION})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue