Support releases with prerelease tags

This commit is contained in:
Calle Pettersson
2019-05-25 14:43:36 +02:00
parent 85fdfb44b8
commit daa6f3d111

View File

@@ -40,12 +40,13 @@ after_build:
return return
} }
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$BuildVersion = Get-Content VERSION
# The MSI version is not semver compliant, so just take the numerical parts # The MSI version is not semver compliant, so just take the numerical parts
$Version = $env:APPVEYOR_REPO_TAG_NAME -replace '^v?([0-9\.]+).*$','$1' $MSIVersion = $env:APPVEYOR_REPO_TAG_NAME -replace '^v?([0-9\.]+).*$','$1'
foreach($Arch in "amd64","386") { foreach($Arch in "amd64","386") {
Write-Verbose "Building wmi_exporter $Version msi for $Arch" Write-Verbose "Building wmi_exporter $MSIVersion msi for $Arch"
.\installer\build.ps1 -PathToExecutable .\output\$Arch\wmi_exporter-$Version-$Arch.exe -Version $Version -Arch "$Arch" .\installer\build.ps1 -PathToExecutable .\output\$Arch\wmi_exporter-$BuildVersion-$Arch.exe -Version $MSIVersion -Arch "$Arch"
Move-Item installer\Output\wmi_exporter-$Version-$Arch.msi output\$Arch\ Move-Item installer\Output\wmi_exporter-$MSIVersion-$Arch.msi output\$Arch\
} }
- promu checksum output\ - promu checksum output\