mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-07 21:46:37 +00:00
fix: makefile variable override (#1482)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user