Skip to content

Commit cb15e8e

Browse files
committed
Update core tools version regex to allow for -preview suffix (#4427)
1 parent 674f3b5 commit cb15e8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eng/scripts/ArtifactAssemblerHelpers/moveNugetPackage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $defaultArtifactName = $env:DEFAULT_ARTIFACT_NAME
1010
$artifactPath = Join-Path -Path $CurrentDirectory -ChildPath "$defaultArtifactAlias\$defaultArtifactName"
1111

1212
# Define the regex pattern to match the nupkg file (digit.digit.4digits)
13-
$regexPattern = "^Microsoft\.Azure\.Functions\.CoreTools\.\d+\.\d+\.\d{4}\.nupkg$"
13+
$regexPattern = "^Microsoft\.Azure\.Functions\.CoreTools\.\d+\.\d+\.\d{4}(?:-[\w\d\-]+)?\.nupkg$"
1414

1515
# Look for the first nupkg file that matches the pattern in the constructed path
1616
$fileToMove = Get-ChildItem -Path $artifactPath -Filter "*.nupkg" | Where-Object { $_.Name -match $regexPattern } | Select-Object -First 1

src/Cli/ArtifactAssembler/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static class Constants
1111
internal const string CoreToolsHostDirectoryName = "host";
1212
internal const string VisualStudioOutputArtifactDirectoryName = "coretools-visualstudio";
1313
internal const string InProcOutputArtifactNameSuffix = "_inproc";
14-
internal const string CoreToolsProductVersionPattern = @"(\d+\.\d+\.\d+)$";
14+
internal const string CoreToolsProductVersionPattern = @"(\d+\.\d+\.\d+(?:-[\w\d\-]+)?)$";
1515
internal const string ArtifactNameRegexPattern = @"^(.*?)(\d+\.\d+\.\d+)$";
1616
internal const string OutOfProcDirectoryName = "default";
1717
internal const string CliOutputArtifactDirectoryName = "coretools-cli";

0 commit comments

Comments
 (0)