From 93624c3700cfdafcb995315c8c019656a140a242 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 5 Mar 2022 20:44:20 -0500 Subject: [PATCH] Fix beta builds with powershell release tool --- release-tool.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release-tool.ps1 b/release-tool.ps1 index f39ca158a..3416d9c66 100644 --- a/release-tool.ps1 +++ b/release-tool.ps1 @@ -37,7 +37,6 @@ param( [Parameter(ParameterSetName = "merge", Mandatory, Position = 1)] [Parameter(ParameterSetName = "build", Mandatory, Position = 1)] [Parameter(ParameterSetName = "sign", Mandatory, Position = 1)] - [ValidatePattern("^[0-9]\.[0-9]\.[0-9]$")] [string] $Version, [Parameter(ParameterSetName = "build", Mandatory)] @@ -258,7 +257,7 @@ if ($ExtraPath) { $SourceDir = (Resolve-Path $SourceDir).Path # Check format of -Version -if ($Version -notmatch "^\d+\.\d+\.\d+$") { +if ($Version -notmatch "^\d+\.\d+\.\d+(-Beta\d*)?$") { throw "Invalid format for -Version input" } @@ -349,7 +348,7 @@ if ($Merge) { Remove-Item $OutDir -Recurse } - if ($Version -match "-beta\\d+$") { + if ($Version -match "-beta\d*$") { $CMakeOptions = "$CMakeOptions -DKEEPASSXC_BUILD_TYPE=PreRelease" } else { $CMakeOptions = "$CMakeOptions -DKEEPASSXC_BUILD_TYPE=Release"