Provide a way to explicitly set commit count and sha

This commit is contained in:
Matt Ellis 2017-05-24 17:28:07 -07:00 committed by Nick Guerrera
parent 218b887d87
commit 16ec23f86b

View file

@ -1,12 +1,14 @@
<Project ToolsVersion="15.0">
<Target Name="WriteGitCommitInfoProps">
<Exec Command="git rev-list --count HEAD"
ConsoleToMSBuild="true">
ConsoleToMSBuild="true"
Condition="'$(GitInfoCommitCount)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
</Exec>
<Exec Command="git rev-parse HEAD"
ConsoleToMSBuild="true">
ConsoleToMSBuild="true"
Condition="'$(GitInfoCommitHash)' == ''">
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
</Exec>