mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8596 from efuss/VERSION
Avoid name clashes on case-insensitive file systems
This commit is contained in:
commit
54541eccfd
|
@ -89,7 +89,7 @@ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
|
|||
set(ICINGA2_LICENSE "${ICINGA2_LICENSE_GPL}\n\n---\n\n${ICINGA2_LICENSE_ADDITIONS}")
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})
|
||||
|
||||
file(STRINGS VERSION SPEC_VERSION REGEX "^Version:")
|
||||
file(STRINGS ICINGA2_VERSION SPEC_VERSION REGEX "^Version:")
|
||||
string(LENGTH "${SPEC_VERSION}" SPEC_VERSION_LENGTH)
|
||||
math(EXPR SPEC_VERSION_LENGTH "${SPEC_VERSION_LENGTH} - 9")
|
||||
string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_VERSION_LENGTH} SPEC_VERSION)
|
||||
|
@ -102,7 +102,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
|
|||
configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
|
||||
else()
|
||||
if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
|
||||
file(STRINGS VERSION SPEC_REVISION REGEX "^Revision: ")
|
||||
file(STRINGS ICINGA2_VERSION SPEC_REVISION REGEX "^Revision: ")
|
||||
string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
|
||||
math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 10")
|
||||
string(SUBSTRING ${SPEC_REVISION} 10 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
|
||||
|
@ -523,4 +523,4 @@ if(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
include(CPack)
|
||||
|
|
|
@ -54,7 +54,7 @@ master branch which should be part of this release.
|
|||
Update the version:
|
||||
|
||||
```bash
|
||||
perl -pi -e "s/Version: .*/Version: $VERSION/g" VERSION
|
||||
perl -pi -e "s/Version: .*/Version: $VERSION/g" ICINGA2_VERSION
|
||||
```
|
||||
|
||||
## Changelog <a id="changelog"></a>
|
||||
|
|
|
@ -2345,7 +2345,7 @@ for implementation details.
|
|||
|
||||
CMake determines the Icinga 2 version number using `git describe` if the
|
||||
source directory is contained in a Git repository. Otherwise the version number
|
||||
is extracted from the [VERSION](VERSION) file. This behavior can be
|
||||
is extracted from the [ICINGA2_VERSION](ICINGA2_VERSION) file. This behavior can be
|
||||
overridden by creating a file called `icinga-version.h.force` in the source
|
||||
directory. Alternatively the `-DICINGA2_GIT_VERSION_INFO=OFF` option for CMake
|
||||
can be used to disable the usage of `git describe`.
|
||||
|
|
Loading…
Reference in New Issue