Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Elskom/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.
https://github.com/Elskom/GitBuildInfo.SourceGenerator
csharp csharp-sourcegenerator source-generator sourcegenerator
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/Elskom/GitBuildInfo.SourceGenerator
- Owner: Elskom
- License: mit
- Created: 2021-03-26T21:52:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-07T22:24:22.000Z (over 2 years ago)
- Last Synced: 2024-11-03T04:07:36.312Z (about 1 month ago)
- Topics: csharp, csharp-sourcegenerator, source-generator, sourcegenerator
- Language: C#
- Homepage:
- Size: 116 KB
- Stars: 39
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
- RSCG_Examples - GitBuildInfo.SourceGenerator
- csharp-source-generators - GitBuildInfo.SourceGenerator - ![stars](https://img.shields.io/github/stars/Elskom/GitBuildInfo.SourceGenerator?style=flat-square&cacheSeconds=604800) ![last commit](https://img.shields.io/github/last-commit/Elskom/GitBuildInfo.SourceGenerator?style=flat-square&cacheSeconds=86400) - for dumping the git information (commit hash, branch, the head description) into assembly level metadata attributes. (Source Generators / Other)
README
# 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](https://app.codacy.com/project/badge/Grade/d13da68cd3784f1486af29432e75e707)](https://www.codacy.com/gh/Elskom/GitBuildInfo.SourceGenerator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Elskom/GitBuildInfo.SourceGenerator&utm_campaign=Badge_Grade)
[![Codacy Coverage Badge](https://app.codacy.com/project/badge/Coverage/d13da68cd3784f1486af29432e75e707)](https://www.codacy.com/gh/Elskom/GitBuildInfo.SourceGenerator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Elskom/GitBuildInfo.SourceGenerator&utm_campaign=Badge_Coverage)| Package | Version |
|:-------:|:-------:|
| GitBuildInfo.SourceGenerator | [![NuGet Badge](https://buildstats.info/nuget/GitBuildInfo.SourceGenerator?includePreReleases=true)](https://www.nuget.org/packages/GitBuildInfo.SourceGenerator/) |## Usage
1. Install this package into your project with:
```xmlall
```
2. 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:
* ```` (Optional, default is false)
* ```` (Required, Note: Do not include anything before the type name like a fully qualified namespace or any ``.``'s. For that you need to set ``RootNamespace`` below)
* ```` (Required unless you want the type to be assumed to be in the ``Elskom.Generic.Libs`` namespace by the generator)
3. The generator package should now run a build task to grab information prior to it executing the generator.