From c567336b8c9473cf5b56a93e69ffaab23c96e9bb Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 13 Sep 2024 13:57:16 -0700 Subject: [PATCH] add sourcelink reconstruction msbuild --- Directory.Build.targets | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 82bf85fa..89ae2eea 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -16,4 +16,38 @@ + + + + + + + + false + <_TranslateUrlPattern>(https://azfunc%40dev\.azure\.com/azfunc/internal/_git|https://dev\.azure\.com/azfunc/internal/_git|https://azfunc\.visualstudio\.com/internal/_git|azfunc%40vs-ssh\.visualstudio\.com:v3/azfunc/internal|git%40ssh\.dev\.azure\.com:v3/azfunc/internal)/([^/\.]+)\.(.+) + <_TranslateUrlReplacement>https://github.com/$2/$3 + + + + + + $([System.Text.RegularExpressions.Regex]::Replace($(ScmRepositoryUrl), $(_TranslateUrlPattern), $(_TranslateUrlReplacement))) + + + + $([System.Text.RegularExpressions.Regex]::Replace(%(SourceRoot.ScmRepositoryUrl), $(_TranslateUrlPattern), $(_TranslateUrlReplacement))) + + +