From: Michael Insel Date: Thu, 10 Oct 2019 16:39:33 +0000 (+0200) Subject: ChocoInstall: Update script to use checksum verification X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c1b0a7b0f337cb28bbabd3de8954a320fbe1c29;p=icinga2 ChocoInstall: Update script to use checksum verification --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd24deb8..0f92e092f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -514,4 +514,4 @@ if(WIN32) ) endif() -include(CPack) +include(CPack) \ No newline at end of file diff --git a/choco/chocolateyInstall.ps1.cmake b/choco/chocolateyInstall.ps1.cmake index 8a524419f..26fe2396a 100755 --- a/choco/chocolateyInstall.ps1.cmake +++ b/choco/chocolateyInstall.ps1.cmake @@ -1,8 +1,20 @@ -$packageName = 'icinga2' -$installerType = 'msi' -$url32 = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86.msi' +$packageName= 'icinga2' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86.msi' $url64 = 'https://packages.icinga.com/windows/Icinga2-v${CHOCO_VERSION_SHORT}-x86_64.msi' -$silentArgs = '/qn /norestart' -$validExitCodes = @(0) -Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url32" "$url64" -validExitCodes $validExitCodes +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + url = $url + url64bit = $url64 + silentArgs = "/qn /norestart" + validExitCodes= @(0) + softwareName = 'Icinga 2*' + checksum = '' # TODO: Add checksum + checksumType = 'sha256' + checksum64 = '' # TODO: Add checksum + checksumType64= 'sha256' +} + +Install-ChocolateyPackage @packageArgs \ No newline at end of file