From 8c134722f4c62ee95cf2d30958b2548eaa2568a8 Mon Sep 17 00:00:00 2001 From: "Kharitonov, Mark" Date: Fri, 9 Jul 2021 12:27:21 -0400 Subject: [PATCH 1/2] Adjust the relative source file path when indexing sources in a multi-repo checkout build. --- .../IndexHelpers/SrcSrvIniContentFunctions.ps1 | 10 ++++++++++ Tasks/PublishSymbolsV2/task.json | 2 +- Tasks/PublishSymbolsV2/task.loc.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Tasks/PublishSymbolsV2/IndexHelpers/SrcSrvIniContentFunctions.ps1 b/Tasks/PublishSymbolsV2/IndexHelpers/SrcSrvIniContentFunctions.ps1 index 278fdaa71121..b17eaff69c29 100644 --- a/Tasks/PublishSymbolsV2/IndexHelpers/SrcSrvIniContentFunctions.ps1 +++ b/Tasks/PublishSymbolsV2/IndexHelpers/SrcSrvIniContentFunctions.ps1 @@ -82,8 +82,18 @@ function New-TfsGitSrcSrvIniContent { # Make the sources root path end with a trailing slash. $sourcesRootPath = $provider.SourcesRootPath.TrimEnd('\') $sourcesRootPath = "$sourcesRootPath\" + $isMultiRepoCheckout = !(Test-Path "${sourcesRootPath}.git") foreach ($sourceFilePath in $SourceFilePaths) { [string]$relativeSourceFilePath = $sourceFilePath.Substring($sourcesRootPath.Length) + if ($isMultiRepoCheckout) { + $i = $relativeSourceFilePath.IndexOf('\') + if ($i -gt 0) { + $repoName = $relativeSourceFilePath.Substring(0, $i) + if (Test-Path "${sourcesRootPath}$repoName\.git") { + $relativeSourceFilePath = $relativeSourceFilePath.Substring($i + 1) + } + } + } $relativeSourceFilePath = $relativeSourceFilePath.Replace('\', '/') $relativeSourceFilePath = "/$relativeSourceFilePath" "$sourceFilePath*TFS_COLLECTION*TFS_TEAM_PROJECT*TFS_REPO*TFS_COMMIT*TFS_SHORT_COMMIT*$relativeSourceFilePath*TFS_APPLY_FILTERS" diff --git a/Tasks/PublishSymbolsV2/task.json b/Tasks/PublishSymbolsV2/task.json index 92bc93389613..c877f539dc51 100644 --- a/Tasks/PublishSymbolsV2/task.json +++ b/Tasks/PublishSymbolsV2/task.json @@ -13,7 +13,7 @@ "preview": false, "version": { "Major": 2, - "Minor": 172, + "Minor": 190, "Patch": 0 }, "minimumAgentVersion": "1.95.0", diff --git a/Tasks/PublishSymbolsV2/task.loc.json b/Tasks/PublishSymbolsV2/task.loc.json index d1b2584d00eb..e6a933da5e6e 100644 --- a/Tasks/PublishSymbolsV2/task.loc.json +++ b/Tasks/PublishSymbolsV2/task.loc.json @@ -13,7 +13,7 @@ "preview": false, "version": { "Major": 2, - "Minor": 172, + "Minor": 190, "Patch": 0 }, "minimumAgentVersion": "1.95.0", From 9f69e88ed03aaa71b54a0d9a0c6fea8f714ac1ce Mon Sep 17 00:00:00 2001 From: Carl Tanner Date: Thu, 16 Sep 2021 21:52:02 -0700 Subject: [PATCH 2/2] retrigger checks