Skip to content

Commit 5c26de3

Browse files
fix version evaluation for windows installer
1 parent 392ff58 commit 5c26de3

File tree

1 file changed

+8
-2
lines changed
  • keychain_win/keychain_service/service_installer/wsserverinstaller

1 file changed

+8
-2
lines changed

keychain_win/keychain_service/service_installer/wsserverinstaller/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,15 @@ if(WIN32)
127127
list( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/git_version_gen" )
128128
include( GetGitRevisionDescription )
129129
git_describe(KEYCHAIN_COMMON_GIT_REVISION_DESCRIPTION --tags)
130-
SET(VERSION_REGEXP "^[0-9]+\\.[0-9]+\\-[0-9]+")
130+
SET(VERSION_REGEXP "^[0-9]+\\.[0-9]+(\\-[0-9])*")
131131
string(REGEX MATCH ${VERSION_REGEXP} VERSION_STRING_GIT ${KEYCHAIN_COMMON_GIT_REVISION_DESCRIPTION})
132-
string(REGEX REPLACE "\\-" "." VERSION_STRING ${VERSION_STRING_GIT})
132+
string(FIND ${VERSION_STRING_GIT} "-" 3RD_NUM_POS)
133+
if (${3RD_NUM_POS} EQUAL "-1")
134+
set(VERSION_STRING ${VERSION_STRING_GIT})
135+
string(APPEND VERSION_STRING ".0")
136+
else()
137+
string(REPLACE "-" "." VERSION_STRING ${VERSION_STRING_GIT})
138+
endif()
133139
set(installerversion ${VERSION_STRING})
134140

135141
#-bf - flag causes all of the files to be bound int the resulting .wixout/.* file.

0 commit comments

Comments
 (0)