Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions choco/chocolateyInstall.ps1.template.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
$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'

$packageArgs = @{
packageName = $packageName
fileType = 'msi'
url = $url
url64bit = $url64
silentArgs = "/qn /norestart"
validExitCodes= @(0)
softwareName = 'Icinga 2*'
checksum = '%CHOCO_32BIT_CHECKSUM%'
checksumType = 'sha256'
checksum64 = '%CHOCO_64BIT_CHECKSUM%'
checksumType64= 'sha256'
}
Expand Down
10 changes: 1 addition & 9 deletions tools/win32/build-choco.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,13 @@ if(-not (Test-Path "$($env:ICINGA2_BUILDPATH)\choco\chocolateyInstall.ps1.templa
$chocoInstallScriptTemplatePath = "$($env:ICINGA2_BUILDPATH)\choco\chocolateyInstall.ps1.template"
$chocoInstallScript = Get-Content $chocoInstallScriptTemplatePath

if(-not (Test-Path "$($env:ICINGA2_BUILDPATH)\*-x86.msi")) {
throw "Could not find Icinga 2 32 bit MSI package. Abort."
}

$hashMSIpackage32 = Get-FileHash "$($env:ICINGA2_BUILDPATH)\*-x86.msi"
Write-Output "File Hash for 32 bit MSI package: $($hashMSIpackage32.Hash)."

if(-not (Test-Path "$($env:ICINGA2_BUILDPATH)\*-x86_64.msi")) {
throw "Could not find Icinga 2 64 bit MSI package. Abort."
}

$hashMSIpackage64 = Get-FileHash "$($env:ICINGA2_BUILDPATH)\*-x86_64.msi"
Write-Output "File Hash for 32 bit MSI package: $($hashMSIpackage64.Hash)"
Write-Output "File Hash for 64 bit MSI package: $($hashMSIpackage64.Hash)"

$chocoInstallScript = $chocoInstallScript.Replace("%CHOCO_32BIT_CHECKSUM%", "$($hashMSIpackage32.Hash)")
$chocoInstallScript = $chocoInstallScript.Replace("%CHOCO_64BIT_CHECKSUM%", "$($hashMSIpackage64.Hash)")
Write-Output $chocoInstallScript

Expand Down
Loading