Migrate to GitInfo for embedding git information (#911)

* Migrate to GitInfo for embedding git information

* Adjust gitignore to reflect new git system

* Fix changes from broken merge

* Remove vestigial code in VersionHelper

---------

Co-authored-by: sudokoko <koko@drones.gay>
This commit is contained in:
Josh 2023-10-29 18:50:16 -05:00 committed by GitHub
parent aa3caea363
commit b8324d0c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 30 additions and 232 deletions

View file

@ -17,30 +17,5 @@
<ItemGroup>
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="gitVersion.txt" />
<EmbeddedResource Include="gitVersion.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="gitBranch.txt" />
<EmbeddedResource Include="gitBranch.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="gitRemotes.txt" />
<EmbeddedResource Include="gitRemotes.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<None Remove="gitUnpushed.txt" />
<EmbeddedResource Include="gitUnpushed.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="git describe --long --always --dirty --exclude=\* --abbrev=8 &gt; &quot;$(ProjectDir)/gitVersion.txt&quot;" />
<Exec Command="git branch --show-current &gt; &quot;$(ProjectDir)/gitBranch.txt&quot;" />
<Exec Command="git remote -v &gt; &quot;$(ProjectDir)/gitRemotes.txt&quot;" />
<Exec Command="git log --branches --not --remotes --oneline &gt; &quot;$(ProjectDir)/gitUnpushed.txt&quot;" />
</Target>
</Project>