
* First try at refactor of Prepare.targets * Enable restore of CLI build tasks * Fix up build * Feedback * Newlines * Add new props to sln * CommitCount * NuGet.config * WorkingDir * packages dir path * Add missing nuget.configs * Workaround for https://github.com/NuGet/Home/issues/4583 * Match NuGet.Config casing * Put back Version Badge Properties * Remove duplicate
32 lines
1.2 KiB
XML
32 lines
1.2 KiB
XML
<Project ToolsVersion="15.0">
|
|
<Target Name="WriteGitCommitInfoProps"
|
|
DependsOnTargets="BuildDotnetCliBuildFramework">
|
|
<GetCommitCount>
|
|
<Output TaskParameter="CommitCount" PropertyName="GitInfoCommitCount" />
|
|
</GetCommitCount>
|
|
|
|
<GetCommitHash>
|
|
<Output TaskParameter="CommitHash" PropertyName="GitInfoCommitHash" />
|
|
</GetCommitHash>
|
|
|
|
<PropertyGroup>
|
|
<ShouldOverWriteThePropsFile
|
|
Condition=" '$(CommitCount)' != '$(GitInfoCommitCount)' Or
|
|
'$(CommitHash)' != '$(GitInfoCommitHash)' ">true</ShouldOverWriteThePropsFile>
|
|
|
|
<GitCommitInfoPropsContent>
|
|
<Project ToolsVersion="15.0">
|
|
<PropertyGroup>
|
|
<CommitCount>$(GitInfoCommitCount)</CommitCount>
|
|
<CommitHash>$(GitInfoCommitHash)</CommitHash>
|
|
</PropertyGroup>
|
|
</Project>
|
|
</GitCommitInfoPropsContent>
|
|
</PropertyGroup>
|
|
|
|
<WriteLinesToFile File="$(GitCommitInfoProps)"
|
|
Lines="$(GitCommitInfoPropsContent)"
|
|
Condition=" '$(ShouldOverwriteThePropsFile)' == 'true' "
|
|
Overwrite="true" />
|
|
</Target>
|
|
</Project>
|