-
Notifications
You must be signed in to change notification settings - Fork 4
/
common.props
35 lines (33 loc) · 1.52 KB
/
common.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Authors>Nongzhsh</Authors>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Nongzhsh/Awesome.Net.WritableOptions</RepositoryUrl>
<FileVersion>$([System.DateTime]::Now.ToString("yy.M.d.Hmm"))</FileVersion>
<VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix Condition="'$(Configuration)' == 'Debug'">beta</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" />
</ItemGroup>
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">
<Exec Command="git describe --long --always --exclude=* --abbrev=8"
ConsoleToMSBuild="True"
ContinueOnError="True"
IgnoreExitCode="True"
StandardOutputImportance="low"
StandardErrorImportance="low">
<Output PropertyName="SourceRevisionId" TaskParameter="ConsoleOutput" />
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Message Text="The SourceRevisionId parameter value is $(SourceRevisionId)" Importance="high" Condition="'$(ErrorCode)' == '0'" />
<PropertyGroup Condition="'$(ErrorCode)' != '0'">
<SourceRevisionId></SourceRevisionId>
</PropertyGroup>
<ItemGroup>
<AssemblyMetadata Include="SourceRevisionId" Value="$(SourceRevisionId)" Condition="'$(SourceRevisionId)' != ''" />
</ItemGroup>
</Target>
</Project>