mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-03 20:47:37 +03:00
Enhance release-tool handling of app signing
* Introduce .gitrev file to tarball generation * Correct labeling of builds based on supplied parameters to CMake * Convert supplied key file path to absolute when building under MSYS * Support OVERRIDE_VERSION to build properly version numbered snapshots * Do not build tests for any build
This commit is contained in:
parent
29c79c935a
commit
8bc94874a1
2 changed files with 32 additions and 21 deletions
|
@ -80,6 +80,7 @@ set(KEEPASSXC_VERSION_MAJOR "2")
|
|||
set(KEEPASSXC_VERSION_MINOR "4")
|
||||
set(KEEPASSXC_VERSION_PATCH "0")
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}")
|
||||
set(OVERRIDE_VERSION "" CACHE STRING "Override the KeePassXC Version for Snapshot builds")
|
||||
|
||||
set(KEEPASSXC_BUILD_TYPE "Snapshot" CACHE STRING "Set KeePassXC build type to distinguish between stable releases and snapshots")
|
||||
set_property(CACHE KEEPASSXC_BUILD_TYPE PROPERTY STRINGS Snapshot Release PreRelease)
|
||||
|
@ -91,8 +92,10 @@ execute_process(COMMAND git rev-parse --short=7 HEAD
|
|||
OUTPUT_VARIABLE GIT_HEAD
|
||||
ERROR_QUIET)
|
||||
string(STRIP "${GIT_HEAD}" GIT_HEAD)
|
||||
if(GIT_HEAD STREQUAL "")
|
||||
if(GIT_HEAD STREQUAL "" AND NOT GIT_HEAD_OVERRIDE STREQUAL "")
|
||||
string(SUBSTRING "${GIT_HEAD_OVERRIDE}" 0 7 GIT_HEAD)
|
||||
elseif(EXISTS ${CMAKE_SOURCE_DIR}/.gitrev)
|
||||
file(READ ${CMAKE_SOURCE_DIR}/.gitrev GIT_HEAD)
|
||||
endif()
|
||||
message(STATUS "Found Git HEAD Revision: ${GIT_HEAD}\n")
|
||||
|
||||
|
@ -116,13 +119,16 @@ if(OVERRIDE_VERSION)
|
|||
elseif(OVERRIDE_VERSION MATCHES "^[\\.0-9]+$")
|
||||
set(KEEPASSXC_BUILD_TYPE Release)
|
||||
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
||||
else()
|
||||
set(KEEPASSXC_BUILD_TYPE Snapshot)
|
||||
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
||||
endif()
|
||||
else()
|
||||
if(KEEPASSXC_BUILD_TYPE STREQUAL "PreRelease")
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION}-preview")
|
||||
elseif(KEEPASSXC_BUILD_TYPE STREQUAL "Snapshot")
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION}-snapshot")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(KEEPASSXC_BUILD_TYPE STREQUAL "PreRelease" AND NOT OVERRIDE_VERSION)
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION}-preview")
|
||||
elseif(KEEPASSXC_BUILD_TYPE STREQUAL "Snapshot")
|
||||
set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION}-snapshot")
|
||||
endif()
|
||||
|
||||
if(KEEPASSXC_BUILD_TYPE STREQUAL "Release")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue