File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ endif()
116116configure_file (icinga-version .h.in icinga-version .h)
117117
118118# NuGet on Windows requires a semantic versioning, example: 2.10.4.123 (only 4 element, only numeric)
119- string (REGEX REPLACE "-([0-9]+).*$" ".\\ 1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION} " )
119+ string (REGEX REPLACE "^[rv]" "" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION} " )
120+ string (REGEX REPLACE "-([0-9]+).*$" ".\\ 1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION_SAFE} " )
120121string (REGEX REPLACE "-[^\\ .]*(.*)$" "\\ 1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION_SAFE} " )
121122string (REGEX REPLACE "^([0-9]+\\ .[0-9]+\\ .[0-9]+)[\\ .]?[0-9]*" "\\ 1" CHOCO_VERSION_SHORT "${ICINGA2_VERSION_SAFE} " )
122123
Original file line number Diff line number Diff line change @@ -2391,12 +2391,11 @@ for implementation details.
23912391
23922392#### Version detection
23932393
2394- CMake determines the Icinga 2 version number using ` git describe ` if the
2395- source directory is contained in a Git repository. Otherwise the version number
2396- is extracted from the ` ICINGA2_VERSION ` file. This behavior can be
2397- overridden by creating a file called ` icinga-version.h.force ` in the source
2398- directory. Alternatively the ` -DICINGA2_GIT_VERSION_INFO=OFF ` option for CMake
2399- can be used to disable the usage of ` git describe ` .
2394+ CMake determines the Icinga 2 version number using ` git describe ` if the source directory is contained
2395+ in a Git repository or if the source directory has been extracted from an archive built with ` git-archive ` .
2396+ Otherwise the version number is specified in the ` ICINGA2_VERSION ` variable in the main ` CMakeLists.txt `
2397+ file. The ` -DICINGA2_GIT_VERSION_INFO=OFF ` option for CMake can be used to disable the usage of
2398+ ` git describe ` .
24002399
24012400
24022401### Building RPMs <a id =" development-package-builds-rpms " ></a >
You can’t perform that action at this time.
0 commit comments