]> granicus.if.org Git - icinga2/commitdiff
Fix revision in version string.
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 21 May 2014 08:29:44 +0000 (10:29 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 21 May 2014 08:33:14 +0000 (10:33 +0200)
Fixes #6231

CMakeLists.txt
icinga2.spec

index f8a47f6c478fdbbda4751c740f8a3dc8d2b4097e..89e1c3a27467208cb6e9fbef92c5d028f8073db9 100644 (file)
@@ -48,10 +48,16 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
 else()
   if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
     file(STRINGS icinga2.spec SPEC_VERSION REGEX "^Version:")
-    string(LENGTH "${SPEC_VERSION}" SPEC_LENGTH)
-    math(EXPR SPEC_LENGTH "${SPEC_LENGTH} - 9")
-    string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_LENGTH} SPEC_VERSION)
-    set(GIT_VERSION "r${SPEC_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)
+
+    file(STRINGS icinga2.spec SPEC_REVISION REGEX "^%define revision ")
+    string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
+    math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 17")
+    string(SUBSTRING ${SPEC_REVISION} 17 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
+
+    set(GIT_VERSION "r${SPEC_VERSION}-${SPEC_REVISION}")
   endif()
   configure_file(icinga-version.h.cmake icinga-version.h)
 endif()
index ecc6d587f31d150155eab20f55d9be7151621b25..355f5ad5d7ec59e7574bcf961b1630577014e18d 100644 (file)
@@ -17,7 +17,7 @@
 # * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
 # ******************************************************************************/
 
-%define revision 1
+%define revision 1.beta1
 
 %if "%{_vendor}" == "redhat"
 %define el5_boost_version 141
@@ -54,7 +54,7 @@
 
 Summary: Network monitoring application
 Name: icinga2
-Version: 2.0.0.beta1
+Version: 2.0.0
 Release: %{revision}%{?dist}
 License: GPLv2+
 Group: Applications/System