mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Fix the regex for '-ReleaseTag' (#5473)
This commit is contained in:
+2
-2
@@ -377,7 +377,7 @@ function Start-PSBuild {
|
||||
|
||||
[switch]$CrossGen,
|
||||
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag
|
||||
)
|
||||
@@ -1604,7 +1604,7 @@ function Publish-NuGetFeed
|
||||
{
|
||||
param(
|
||||
[string]$OutputPath = "$PSScriptRoot/nuget-artifacts",
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@ function Start-PSPackage {
|
||||
[string]$Version,
|
||||
|
||||
[Parameter(ParameterSetName = "ReleaseTag")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag,
|
||||
|
||||
@@ -457,7 +457,7 @@ function New-PSSignedBuildZip
|
||||
log "Setting $VstsVariableName to $zipLocationPath"
|
||||
Write-Host "##vso[task.setvariable variable=$VstsVariableName]$zipLocationPath"
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
return $zipLocationPath
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ param (
|
||||
# Destination location of the package on docker host
|
||||
[string] $destination = '/mnt',
|
||||
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag,
|
||||
|
||||
@@ -27,7 +27,7 @@ try {
|
||||
Set-Location $location
|
||||
Import-Module "$location/build.psm1"
|
||||
Import-Module "$location/tools/packaging"
|
||||
|
||||
|
||||
Start-PSBootstrap -Package -NoSudo
|
||||
Start-PSBuild -Crossgen -PSModuleRestore @releaseTagParam
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ param (
|
||||
|
||||
[switch] $Wait,
|
||||
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$ReleaseTag,
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
param(
|
||||
[Parameter(ParameterSetName='packageSigned')]
|
||||
[Parameter(ParameterSetName='Build')]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+\.\d+)?$")]
|
||||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
|
||||
[string]$ReleaseTag,
|
||||
|
||||
# full paths to files to add to container to run the build
|
||||
@@ -33,7 +33,7 @@ DynamicParam {
|
||||
$Attributes = New-Object "System.Collections.ObjectModel.Collection``1[System.Attribute]"
|
||||
$Attributes.Add($ParameterAttr) > $null
|
||||
$Attributes.Add($ValidateSetAttr) > $null
|
||||
|
||||
|
||||
# Create the parameter
|
||||
$Parameter = New-Object "System.Management.Automation.RuntimeDefinedParameter" -ArgumentList ("Name", [string], $Attributes)
|
||||
$Dict = New-Object "System.Management.Automation.RuntimeDefinedParameterDictionary"
|
||||
@@ -57,7 +57,7 @@ End {
|
||||
Import-Module (Join-Path -path $PSScriptRoot -childpath '..\packaging')
|
||||
|
||||
# Use temp as destination if not running in VSTS
|
||||
$destFolder = $env:temp
|
||||
$destFolder = $env:temp
|
||||
if($env:Build_ArtifactStagingDirectory)
|
||||
{
|
||||
# Use artifact staging if running in VSTS
|
||||
@@ -101,7 +101,7 @@ End {
|
||||
$unresolvedRepoRoot = Join-Path -Path $PSScriptRoot '../..'
|
||||
$resolvedRepoRoot = (Resolve-Path -Path $unresolvedRepoRoot).ProviderPath
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
Write-Verbose "Starting build at $resolvedRepoRoot ..." -Verbose
|
||||
Import-Module "$location/vstsBuild" -Force
|
||||
|
||||
Reference in New Issue
Block a user