mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Remove "latest" tag from release name
* Also ensure the current tag contains a proper version string.
This commit is contained in:
parent
7cd824ae1c
commit
a98bf1eac3
@ -119,7 +119,8 @@ execute_process(COMMAND git tag --points-at HEAD
|
|||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE GIT_TAG
|
OUTPUT_VARIABLE GIT_TAG
|
||||||
ERROR_QUIET)
|
ERROR_QUIET)
|
||||||
if(GIT_TAG)
|
string(REGEX REPLACE "latest" "" GIT_TAG "${GIT_TAG}")
|
||||||
|
if(GIT_TAG MATCHES "[0-9]+\.[0-9]+\.[0-9]+")
|
||||||
string(STRIP "${GIT_TAG}" GIT_TAG)
|
string(STRIP "${GIT_TAG}" GIT_TAG)
|
||||||
set(OVERRIDE_VERSION ${GIT_TAG})
|
set(OVERRIDE_VERSION ${GIT_TAG})
|
||||||
elseif(EXISTS ${CMAKE_SOURCE_DIR}/.version)
|
elseif(EXISTS ${CMAKE_SOURCE_DIR}/.version)
|
||||||
@ -128,14 +129,14 @@ endif()
|
|||||||
|
|
||||||
string(REGEX REPLACE "(\r?\n)+" "" OVERRIDE_VERSION "${OVERRIDE_VERSION}")
|
string(REGEX REPLACE "(\r?\n)+" "" OVERRIDE_VERSION "${OVERRIDE_VERSION}")
|
||||||
if(OVERRIDE_VERSION)
|
if(OVERRIDE_VERSION)
|
||||||
if(OVERRIDE_VERSION MATCHES "^[\\.0-9]+-(alpha|beta)[0-9]+$")
|
if(OVERRIDE_VERSION MATCHES "^[\\.0-9]+-beta[0-9]*")
|
||||||
set(KEEPASSXC_BUILD_TYPE PreRelease)
|
set(KEEPASSXC_BUILD_TYPE "PreRelease")
|
||||||
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
||||||
elseif(OVERRIDE_VERSION MATCHES "^[\\.0-9]+$")
|
elseif(OVERRIDE_VERSION MATCHES "^[\\.0-9]+$")
|
||||||
set(KEEPASSXC_BUILD_TYPE Release)
|
set(KEEPASSXC_BUILD_TYPE "Release")
|
||||||
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
||||||
else()
|
else()
|
||||||
set(KEEPASSXC_BUILD_TYPE Snapshot)
|
set(KEEPASSXC_BUILD_TYPE "Snapshot")
|
||||||
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
set(KEEPASSXC_VERSION ${OVERRIDE_VERSION})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
Loading…
Reference in New Issue
Block a user