Blame SOURCES/core-setup-4510-commit-id.patch

627693
From e02ee86364b9db3edc298a6a081004aa07473d09 Mon Sep 17 00:00:00 2001
627693
From: Omair Majid <omajid@redhat.com>
627693
Date: Wed, 29 Aug 2018 17:03:25 -0400
627693
Subject: [PATCH] Allow setting the commit id using /p:LatestCommit
627693
627693
This is similar to how CommitCount is already supported.
627693
627693
This lets consumers who are building outside a git repo, such as
627693
source-build, set a commit id which is displayed by `dotnet --info`
627693
and `strings dotnet | grep '@(#)'`.
627693
627693
See: https://github.com/dotnet/source-build/issues/651
627693
See: https://github.com/dotnet/cli/pull/5945
627693
---
627693
 dir.targets | 9 +++++----
627693
 1 file changed, 5 insertions(+), 4 deletions(-)
627693
627693
diff --git a/dir.targets b/dir.targets
627693
index 8d34872c6..59dc1ebde 100644
627693
--- a/dir.targets
627693
+++ b/dir.targets
627693
@@ -17,7 +17,8 @@
627693
     <Exec Command="$(DotnetToolCommand) build $(MSBuildThisFileDirectory)tools-local/tasks/core-setup.tasks.csproj" />
627693
   </Target>
627693
 
627693
-  <Target Name="GetLatestCommitHash">
627693
+  
627693
+          Condition="'$(LatestCommit)' == ''">
627693
     
627693
     <Exec Command="git rev-parse HEAD 2>&1" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
627693
       <Output TaskParameter="ConsoleOutput" PropertyName="LatestCommit" />
627693
@@ -29,13 +30,13 @@
627693
     </PropertyGroup>
627693
   </Target>
627693
 
627693
-  <Target Name="GetCommitCount">
627693
+  
627693
+          Condition="'$(CommitCount)' == ''">
627693
     
627693
           StandardOutputImportance="Low"
627693
           IgnoreExitCode="true"
627693
           IgnoreStandardErrorWarningFormat="true"
627693
-          ConsoleToMSBuild="true"
627693
-          Condition="'$(CommitCount)' == ''">
627693
+          ConsoleToMSBuild="true">
627693
      <Output TaskParameter="ConsoleOutput" PropertyName="CommitCount" />
627693
      <Output TaskParameter="ExitCode" PropertyName="CommitCountExitCode" />
627693
     </Exec>