2017-02-08 22:02:29 +00:00
|
|
|
<Project ToolsVersion="15.0">
|
|
|
|
<Target Name="WriteGitCommitInfoProps"
|
|
|
|
DependsOnTargets="BuildDotnetCliBuildFramework">
|
2017-02-10 20:13:44 +00:00
|
|
|
<GetCommitCount>
|
|
|
|
<Output TaskParameter="CommitCount" PropertyName="GitInfoCommitCount" />
|
|
|
|
</GetCommitCount>
|
|
|
|
|
|
|
|
<GetCommitHash>
|
2017-02-08 22:02:29 +00:00
|
|
|
<Output TaskParameter="CommitHash" PropertyName="GitInfoCommitHash" />
|
|
|
|
</GetCommitHash>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<ShouldOverWriteThePropsFile
|
2017-02-13 21:06:30 +00:00
|
|
|
Condition=" '$(CommitCount)' != '$(GitInfoCommitCount)' Or
|
2017-02-10 20:13:44 +00:00
|
|
|
'$(CommitHash)' != '$(GitInfoCommitHash)' ">true</ShouldOverWriteThePropsFile>
|
2017-02-08 22:02:29 +00:00
|
|
|
|
|
|
|
<GitCommitInfoPropsContent>
|
|
|
|
<Project ToolsVersion="15.0">
|
|
|
|
<PropertyGroup>
|
2017-02-13 21:06:30 +00:00
|
|
|
<CommitCount>$(GitInfoCommitCount)</CommitCount>
|
2017-02-08 22:02:29 +00:00
|
|
|
<CommitHash>$(GitInfoCommitHash)</CommitHash>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Project>
|
|
|
|
</GitCommitInfoPropsContent>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<WriteLinesToFile File="$(GitCommitInfoProps)"
|
|
|
|
Lines="$(GitCommitInfoPropsContent)"
|
2017-02-09 18:50:21 +00:00
|
|
|
Condition=" '$(ShouldOverwriteThePropsFile)' == 'true' "
|
|
|
|
Overwrite="true" />
|
2017-02-08 22:02:29 +00:00
|
|
|
</Target>
|
|
|
|
</Project>
|