feat: Add ARM64 MSI builds

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy 2023-11-19 13:29:47 +10:00
parent f1b2b319f5
commit d4b48e52e6
No known key found for this signature in database
GPG Key ID: 235C15B6086C9D7E
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ Param (
[Parameter(Mandatory = $true)] [Parameter(Mandatory = $true)]
[String] $Version, [String] $Version,
[Parameter(Mandatory = $false)] [Parameter(Mandatory = $false)]
[ValidateSet("amd64", "386")] [ValidateSet("amd64", "arm64", "386")]
[String] $Arch = "amd64" [String] $Arch = "amd64"
) )
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
@ -23,7 +23,7 @@ mkdir -Force Work | Out-Null
Copy-Item -Force $PathToExecutable Work/windows_exporter.exe Copy-Item -Force $PathToExecutable Work/windows_exporter.exe
Write-Verbose "Creating windows_exporter-${Version}-${Arch}.msi" Write-Verbose "Creating windows_exporter-${Version}-${Arch}.msi"
$wixArch = @{"amd64" = "x64"; "386" = "x86"}[$Arch] $wixArch = @{"amd64" = "x64"; "arm64" = "arm64"; "386" = "x86"}[$Arch]
$wixOpts = "-ext WixFirewallExtension -ext WixUtilExtension" $wixOpts = "-ext WixFirewallExtension -ext WixUtilExtension"
Invoke-Expression "wix build -arch $wixArch -o .\windows_exporter-$($Version)-$($Arch).msi .\windows_exporter.wxs -d Version=$($Version) -ext WixToolset.Firewall.wixext -ext WixToolset.Util.wixext" Invoke-Expression "wix build -arch $wixArch -o .\windows_exporter-$($Version)-$($Arch).msi .\windows_exporter.wxs -d Version=$($Version) -ext WixToolset.Firewall.wixext -ext WixToolset.Util.wixext"