Embed last git commit hash in binary.
This commit is contained in:
parent
741c5002c8
commit
3e4a860280
2 changed files with 9 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,7 @@
|
||||||
|
# Extras
|
||||||
|
# The commit hash file generated before the build process
|
||||||
|
git-hash.txt
|
||||||
|
|
||||||
# ---> C Sharp
|
# ---> C Sharp
|
||||||
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
|
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
|
|
|
@ -46,5 +46,9 @@
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Help.md" />
|
<EmbeddedResource Include="Help.md" />
|
||||||
|
<EmbeddedResource Include="git-hash.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent IgnoreExitCode="true">git rev-parse HEAD >../../git-hash.txt</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in a new issue