Use built-in SourceRevisionId
instead of git rev-parse HEAD
(#19091)
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
This commit is contained in:
parent
3d908e8989
commit
21e0334c65
2 changed files with 2 additions and 10 deletions
|
@ -482,9 +482,9 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="GenerateVersionFile"
|
||||
DependsOnTargets="SetupBundledComponents;GetCommitHash;GenerateFullNuGetVersion">
|
||||
DependsOnTargets="SetupBundledComponents;GenerateFullNuGetVersion">
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory).version"
|
||||
Lines="$(GitCommitHash);$(Version);$(Rid);$(FullNugetVersion);$(SdkFeatureBand)"
|
||||
Lines="$(SourceRevisionId);$(Version);$(Rid);$(FullNugetVersion);$(SdkFeatureBand)"
|
||||
Overwrite="true" />
|
||||
|
||||
<!-- This is a hack to make the full nuget version available during the publishing step -->
|
||||
|
|
|
@ -6,12 +6,4 @@
|
|||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue