mirror of https://github.com/Icinga/icinga2.git
parent
7310a254e8
commit
a05348acd2
|
@ -42,11 +42,15 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})
|
||||||
|
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
git_describe(GIT_VERSION --tags)
|
git_describe(GIT_VERSION --tags)
|
||||||
if(GIT_VERSION MATCHES "-NOTFOUND$")
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
|
||||||
configure_file(icinga-version.h.fallback ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
|
configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
|
||||||
else()
|
else()
|
||||||
|
if(GIT_VERSION MATCHES "-NOTFOUND$")
|
||||||
|
file(STRINGS icinga2.spec SPEC_VERSION REGEX "^Version:")
|
||||||
|
string(SUBSTRING ${SPEC_VERSION} 9 -1 SPEC_VERSION)
|
||||||
|
set(GIT_VERSION "r${SPEC_VERSION}")
|
||||||
|
endif()
|
||||||
configure_file(icinga-version.h.cmake icinga-version.h)
|
configure_file(icinga-version.h.cmake icinga-version.h)
|
||||||
configure_file(${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.fallback COPYONLY)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@ -140,7 +144,6 @@ set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico")
|
||||||
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico")
|
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/icinga-app\\\\icinga.ico")
|
||||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "sbin\\\\icinga2.exe")
|
set(CPACK_NSIS_INSTALLED_ICON_NAME "sbin\\\\icinga2.exe")
|
||||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
|
||||||
set(CPACK_SOURCE_IGNORE_FILES "/.git/" "/debian/" "/.vagrant/" "/release/" "/debug/" "/build/" )
|
|
||||||
|
|
||||||
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "sbin")
|
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "sbin")
|
||||||
set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard")
|
set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard")
|
||||||
|
|
24
INSTALL
24
INSTALL
|
@ -69,22 +69,26 @@ that there are no local modifications:
|
||||||
|
|
||||||
$ git status
|
$ git status
|
||||||
|
|
||||||
The CPack tool will package _all_ files in the source directory.
|
Here's a short check-list for releases:
|
||||||
|
|
||||||
Next you'll have to create a separate build directory that is not inside
|
* Bump the version in icinga2.spec.
|
||||||
the source directory. If you fail to do this CPack will try to include the
|
* Update the ChangeLog and doc/1-about.md files.
|
||||||
build directory in the tarball.
|
* Commit these changes to the "next" branch and create a signed tag (tags/v<VERSION>).
|
||||||
|
* Merge the "next" branch into the "master" branch (using --ff-only).
|
||||||
|
* Bump the version to "v<NEXT-VERSION>-dev" and commit this change to the "next" branch.
|
||||||
|
|
||||||
$ cd ..
|
Note: CMake determines the Icinga 2 version number using "git describe" if the
|
||||||
$ mkdir icinga2-release && cd icinga2-release
|
source directory is contained in a Git repository. Otherwise the version number
|
||||||
$ cmake ../icinga2 -DCPACK_SOURCE_GENERATE=TGZ -DCPACK_SOURCE_PACKAGE_FILE_NAME=icinga2-0.0.10
|
is extracted from the icinga2.spec file. This behavior can be overridden by
|
||||||
$ make package_source
|
creating a file called "icinga-version.h.force" in the source directory.
|
||||||
|
|
||||||
Update the package name to reflect the version of the tarball you're creating.
|
Use "git archive" to build the release tarball:
|
||||||
|
|
||||||
|
$ git archive --format=tgz --prefix=icinga2-<VERSION>/ tags/v<VERSION>
|
||||||
|
|
||||||
Finally you should verify that the tarball only contains the files it should contain:
|
Finally you should verify that the tarball only contains the files it should contain:
|
||||||
|
|
||||||
$ tar ztf icinga2-0.0.10.tar.gz | less
|
$ tar ztf icinga2-<VERSION>.tar.gz | less
|
||||||
|
|
||||||
Building Icinga 2
|
Building Icinga 2
|
||||||
-----------------
|
-----------------
|
||||||
|
|
Loading…
Reference in New Issue