From 96696ab2bb60d143e8ad5de595b50357590df8ea Mon Sep 17 00:00:00 2001 From: Alexandros Kritikos Date: Wed, 26 Aug 2026 22:45:23 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8C=20Allows=20each=20library=20to=20m?= =?UTF-8?q?aintain=20their=20own=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++ src/Directory.Build.props | 74 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index af0fe54..770239c 100644 --- a/.gitignore +++ b/.gitignore @@ -1156,3 +1156,6 @@ artifacts/** ## Machine-specific overrides compose.override.yaml + +## Generated per-project GitVersion config (rendered from GitVersion.template.yml) +src/*/GitVersion.yml diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 08b5757..258c7f4 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,9 +1,79 @@ - - + + http://localhost + + + $(MSBuildThisFileDirectory)..\GitVersion.yml + <_GitVersionIgnorePathsRegex>(paths:\s*\r?\n\s*- ).+ + + + + + + + <_GitVersionTransitiveRef Include="@(ProjectReference->'%(FullPath)')" /> + + + + + + + + + + + + <_GitVersionScopePath Include="$(MSBuildProjectDirectory)" /> + <_GitVersionScopePath Include="@(_GitVersionScopeProjectRef->'%(RootDir)%(Directory)')" /> + + + <_GitVersionScopePath> + $([MSBuild]::EnsureTrailingSlash($([MSBuild]::MakeRelative('$(MSBuildThisFileDirectory)..\', + '%(Identity)'))).Replace('\', '/').Replace('.', '\.').Replace('/', '\/')) + + + + <_GitVersionIgnorePattern>^(?!@(_GitVersionScopePath->'%(EscapedPath)', + '|')|Directory\.Packages\.props|GitVersion\.yml).* + <_GitVersionTemplateContent>$([System.IO.File]::ReadAllText('$(GitVersionTemplateFile)')) + <_GitVersionRenderedContent>$([System.Text.RegularExpressions.Regex]::Replace('$(_GitVersionTemplateContent)', + '$(_GitVersionIgnorePathsRegex)', '$1$(_GitVersionIgnorePattern)')) + + + + + + + + false +