Skip to content

Commit

Permalink
Fix version number verification to allow releases
Browse files Browse the repository at this point in the history
The verification of version number in version.config required
pre-release label always. This fixes the bug and allows release versions.
  • Loading branch information
k-rus committed Dec 18, 2020
1 parent eede24b commit 2cb1492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -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")
Expand Down

0 comments on commit 2cb1492

Please sign in to comment.