Fix version number verification to allow releases

The verification of version number in version.config required
pre-release label always. This fixes the bug and allows release versions.
This commit is contained in:
Ruslan Fomkin 2020-12-18 11:22:23 +01:00 committed by Ruslan Fomkin
parent b21d8631dc
commit c7a12d18a1

View File

@ -30,7 +30,7 @@ endfunction()
configure_file("version.config" "version.config" COPYONLY)
file(READ version.config VERSION_CONFIG)
set(VERSION_REGEX "version[\t ]*=[\t ]*([0-9]+\\.[0-9]+\\.*[0-9]*)([-]([a-z]+[0-9]*))?([-](dev))?\r?\nupdate_from_version[\t ]*=[\t ]*([0-9]+\\.[0-9]+\\.*[0-9]*([-]([a-z]+[0-9]*)))*(\r?\n)*$")
set(VERSION_REGEX "version[\t ]*=[\t ]*([0-9]+\\.[0-9]+\\.*[0-9]*)([-]([a-z]+[0-9]*))?([-](dev))?\r?\nupdate_from_version[\t ]*=[\t ]*([0-9]+\\.[0-9]+\\.*[0-9]*([-]([a-z]+[0-9]*))?)*(\r?\n)*$")
if (NOT (${VERSION_CONFIG} MATCHES ${VERSION_REGEX}))
message(FATAL_ERROR "Cannot read version from version.config")