]> granicus.if.org Git - icinga2/commitdiff
ChocoInstall: Prefer short release version download, not long x.y.z.a
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 26 Sep 2019 11:37:09 +0000 (13:37 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Mon, 30 Sep 2019 07:25:53 +0000 (09:25 +0200)
CMakeLists.txt
choco/chocolateyInstall.ps1.cmake

index bfc5587691f24ae464a7bf60a4430e74092e6757..ddd24deb8936a876feeb0f7b420536f353a9e77c 100644 (file)
@@ -112,7 +112,9 @@ endif()
 # NuGet on Windows requires a semantic versioning, example: 2.10.4.123 (only 4 element, only numeric)
 string(REGEX REPLACE "-([0-9]+).*$" ".\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION}")
 string(REGEX REPLACE "-[^\\.]*(.*)$" "\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION_SAFE}")
-message(STATUS "ICINGA2_VERSION_SAFE=${ICINGA2_VERSION_SAFE}")
+string(REGEX REPLACE "^([0-9]+\\.[0-9]+\\.[0-9]+)[\\.]?[0-9]*" "\\1" CHOCO_VERSION_SHORT "${ICINGA2_VERSION_SAFE}")
+
+message(STATUS "ICINGA2_VERSION_SAFE=${ICINGA2_VERSION_SAFE} CHOCO_VERSION_SHORT=${CHOCO_VERSION_SHORT}")
 
 if(WIN32)
   set(Boost_USE_STATIC_LIBS ON)
index ab1660324bea3039820e7bcd667a59354157572a..8a524419fbbf7a241cb353818b90b90006f09873 100755 (executable)
@@ -1,7 +1,7 @@
 $packageName = 'icinga2'\r
 $installerType = 'msi'\r
-$url32 = 'https://packages.icinga.com/windows/Icinga2-v${ICINGA2_VERSION_SAFE}-x86.msi'\r
-$url64 = 'https://packages.icinga.com/windows/Icinga2-v${ICINGA2_VERSION_SAFE}-x86_64.msi'\r
+$url32 = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86.msi'\r
+$url64 = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86_64.msi'\r
 $silentArgs = '/qn /norestart'\r
 $validExitCodes = @(0)\r
 \r