Home

Awesome

GitBuildInfo.SourceGenerator

Source Generator for dumping the git branch information, commit hash, and if the working tree is dirty or clean on projects that install this and applies them as an assembly level attribute.

Codacy Badge Codacy Coverage Badge

PackageVersion
GitBuildInfo.SourceGeneratorNuGet Badge

Usage

  1. Install this package into your project with:
<PackageReference Include="GitBuildInfo.SourceGenerator" IsImplicitlyDefined="true" Version="*-*">
  <PrivateAssets>all</PrivateAssets>
</PackageReference>
  1. Set the following msbuild properties in your project (or if you have all project file property settings stored in a project specific Directory.Build.props) file:
  1. The generator package should now run a build task to grab information prior to it executing the generator.