Provide a way to explicitly set commit count and sha
This commit is contained in:
parent
218b887d87
commit
16ec23f86b
1 changed files with 4 additions and 2 deletions
|
@ -1,12 +1,14 @@
|
||||||
<Project ToolsVersion="15.0">
|
<Project ToolsVersion="15.0">
|
||||||
<Target Name="WriteGitCommitInfoProps">
|
<Target Name="WriteGitCommitInfoProps">
|
||||||
<Exec Command="git rev-list --count HEAD"
|
<Exec Command="git rev-list --count HEAD"
|
||||||
ConsoleToMSBuild="true">
|
ConsoleToMSBuild="true"
|
||||||
|
Condition="'$(GitInfoCommitCount)' == ''">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
|
||||||
</Exec>
|
</Exec>
|
||||||
|
|
||||||
<Exec Command="git rev-parse HEAD"
|
<Exec Command="git rev-parse HEAD"
|
||||||
ConsoleToMSBuild="true">
|
ConsoleToMSBuild="true"
|
||||||
|
Condition="'$(GitInfoCommitHash)' == ''">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
|
||||||
</Exec>
|
</Exec>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue