提交 5c5e28a7 编写于 作者: A Andy Gocke 提交者: GitHub

Don't include the Git SHA if the ref file isn't present (#13868)

上级 1955baca
......@@ -80,7 +80,7 @@
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../../.git'))</DotGitDir>
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
<GitHeadSha Condition="'$(RefPath)' != ''">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(RefPath)' != '' and Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(HeadFileContent)' != '' and
'$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
</PropertyGroup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册