mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-19 11:09:03 +02:00
ci: give betas and releases distinct numeric file versions (#2712)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
+7
-1
@@ -4,6 +4,10 @@ Param (
|
||||
[String] $PathToExecutable,
|
||||
[Parameter(Mandatory = $true)]
|
||||
[String] $Version,
|
||||
# Numeric version of the package, such as 0.32.0.5 for 0.32.0-beta.5.
|
||||
# Defaults to the numeric part of Version.
|
||||
[Parameter(Mandatory = $false)]
|
||||
[String] $MsiVersion,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateSet("amd64", "arm64")]
|
||||
[String] $Arch = "amd64"
|
||||
@@ -11,7 +15,9 @@ Param (
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# The MSI version is not semver compliant, so just take the numerical parts
|
||||
$MsiVersion = $Version -replace '^v?([0-9\.]+).*$','$1'
|
||||
if (-not $MsiVersion) {
|
||||
$MsiVersion = $Version -replace '^v?([0-9\.]+).*$','$1'
|
||||
}
|
||||
|
||||
# Get absolute path to executable before switching directories
|
||||
$PathToExecutable = Resolve-Path $PathToExecutable
|
||||
|
||||
Reference in New Issue
Block a user