forked from alexAgyapong/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.props
20 lines (18 loc) · 1.09 KB
/
common.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<Project>
<PropertyGroup>
<GitHeadSha>$(GitHeadSha)</GitHeadSha>
<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)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
</PropertyGroup>
<PropertyGroup Condition="'$(GitHeadSha)' != ''">
<CommitHash>$(GitHeadSha)</CommitHash>
</PropertyGroup>
<PropertyGroup Label="Signing">
<!-- <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)common/Build.snk</AssemblyOriginatorKeyFile> -->
<!-- <SignAssembly>true</SignAssembly> -->
<!-- <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign> -->
</PropertyGroup>
</Project>