From c293037143e0174a05edc9655542c4a925d2a242 Mon Sep 17 00:00:00 2001 From: David Justo Date: Fri, 13 Sep 2024 14:10:51 -0700 Subject: [PATCH] add sourcelink reconstruction msbuild (#342) --- 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))) + + +