release build when checking out a git-tag

This commit is contained in:
thez3ro 2018-03-01 14:39:22 +01:00
parent fae8979463
commit 923d24b448
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073

View File

@ -80,7 +80,9 @@ set_property(CACHE KEEPASSXC_BUILD_TYPE PROPERTY STRINGS Snapshot Release PreRel
execute_process(COMMAND git tag --points-at HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_TAG)
if(NOT GIT_TAG AND EXISTS ${CMAKE_SOURCE_DIR}/.version)
if(GIT_TAG)
set(OVERRIDE_VERSION ${GIT_TAG})
elseif(EXISTS ${CMAKE_SOURCE_DIR}/.version)
file(READ ${CMAKE_SOURCE_DIR}/.version OVERRIDE_VERSION)
endif()