Merge pull request #1585 from keepassxreboot/hotfix/release-when-gittag

Release build when checking out a git-tag
This commit is contained in:
TheZ3ro 2018-03-01 17:09:16 +01:00 committed by GitHub
commit 2e8846ef8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()