From 5a6e3d4956964f1083c0af503335c99e1eafef61 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Fri, 1 Nov 2024 18:53:12 -0300 Subject: [PATCH] Document inclusion of SL v2 in readme This comes from the bump to ThisAssembly.Constants 2.0.6, which now considers GitInfo as a direct reference and will trigger the in-IDE requirement of sponsorship (direct, indirect or implicit). --- readme.md | 13 +++++++------ src/Directory.targets | 9 +++++++++ src/GitInfo/GitInfo.msbuildproj | 3 +-- src/GitInfo/readme.md | 5 +++++ 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 src/GitInfo/readme.md diff --git a/readme.md b/readme.md index 2efc857..ab37445 100644 --- a/readme.md +++ b/readme.md @@ -11,14 +11,16 @@ Git Info from MSBuild, C# and VB [![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php) [![Build status](https://ci.appveyor.com/api/projects/status/p9e5xdd86vnfe0q8?svg=true)](https://ci.appveyor.com/project/MobileEssentials/gitinfo) -## Usage - -After installing via [NuGet](https://www.nuget.org/packages/GitInfo): +Install via [NuGet](https://www.nuget.org/packages/GitInfo): ```pwsh PM> Install-Package GitInfo ``` + + +## Usage + By default, if the containing project is a C#, F# or VB project, a compile-time generated source file will contain all the git information and can be accessed from anywhere within the assembly, as constants in a `ThisAssembly` (partial) class and its nested `Git` static class: @@ -105,8 +107,7 @@ VB: > the relevant properties to false: `GenerateAssemblyVersionAttribute`, > `GenerateAssemblyFileVersionAttribute` and `GenerateAssemblyInformationalVersionAttribute`. - -MSBuild: +You can also just build your own versioning logic in a target that depends on GitInfo using plain MSBuild: ```xml @@ -255,7 +256,7 @@ to customize the behavior: included in the [NuGet package](https://www.nuget.org/packages/GitInfo) - 100% incremental build-friendly and high-performing (all proper Inputs/Outputs in place, smart caching of Git info, etc.) - + # Sponsors diff --git a/src/Directory.targets b/src/Directory.targets index a790e87..01943b5 100644 --- a/src/Directory.targets +++ b/src/Directory.targets @@ -1,5 +1,14 @@ + + + $(Description) + + > This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required. + > IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink. + + + diff --git a/src/GitInfo/GitInfo.msbuildproj b/src/GitInfo/GitInfo.msbuildproj index d490322..8400eac 100644 --- a/src/GitInfo/GitInfo.msbuildproj +++ b/src/GitInfo/GitInfo.msbuildproj @@ -12,12 +12,11 @@ - + - \ No newline at end of file diff --git a/src/GitInfo/readme.md b/src/GitInfo/readme.md new file mode 100644 index 0000000..7c842d0 --- /dev/null +++ b/src/GitInfo/readme.md @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file