From d051d71b75490ac54c149eb6d8fd9bb5d6d9fbab Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Thu, 10 Oct 2019 18:39:33 +0200 Subject: [PATCH] ChocoInstall: Update script to use checksum verification --- CMakeLists.txt | 2 +- choco/chocolateyInstall.ps1.cmake | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ab01f550..046f23cf2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -520,4 +520,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