dotnet-installer/src/redist/targets/Versions.targets
Matt Mitchell 2e14d4e8b0
Fixes for stable builds (#8648)
- Enable the switch for stable builds
- Fixup the calculation of FullNugetVersion to not include the iteration if it is empty
2020-09-22 07:59:59 -07:00

17 lines
811 B
XML

<Project>
<Target Name="GenerateFullNuGetVersion">
<PropertyGroup>
<FullNugetVersion>$(VersionPrefix)-$(PreReleaseVersionLabel)</FullNugetVersion>
<FullNugetVersion Condition="'$(PreReleaseVersionIteration)' != ''">$(FullNugetVersion).$(PreReleaseVersionIteration)</FullNugetVersion>
<FullNugetVersion Condition=" '$(VersionSuffixDateStamp)' != '' And '$(VersionSuffixBuildOfTheDay)' != '' ">$(FullNugetVersion).$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay)</FullNugetVersion>
</PropertyGroup>
</Target>
<Target Name="GetCommitHash">
<Exec Command="git rev-parse HEAD"
ConsoleToMSBuild="true"
Condition=" '$(GitCommitHash)' == '' ">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
</Exec>
</Target>
</Project>