fix: makefile variable override (#1482)

This commit is contained in:
Jan-Otto Kröpke
2024-05-12 12:25:06 +02:00
committed by GitHub
parent 6e14d4e53f
commit c99cf180d0
3 changed files with 22 additions and 26 deletions

View File

@@ -11,7 +11,7 @@ Param (
$ErrorActionPreference = "Stop"
# The MSI version is not semver compliant, so just take the numerical parts
$Version = $Version -replace '^v?([0-9\.]+).*$','$1'
$MsiVersion = $Version -replace '^v?([0-9\.]+).*$','$1'
# Get absolute path to executable before switching directories
$PathToExecutable = Resolve-Path $PathToExecutable
@@ -28,7 +28,7 @@ Copy-Item -Force $PathToExecutable Work/windows_exporter.exe
Write-Verbose "Creating windows_exporter-${Version}-${Arch}.msi"
$wixArch = @{"amd64" = "x64"; "arm64" = "arm64"}[$Arch]
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=$($MsiVersion) -ext WixToolset.Firewall.wixext -ext WixToolset.Util.wixext"
Write-Verbose "Done!"
Pop-Location