-
Notifications
You must be signed in to change notification settings - Fork 8
/
Directory.Build.props
89 lines (75 loc) · 3.58 KB
/
Directory.Build.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<Project>
<!-- Detect project kind -->
<PropertyGroup>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<IsTestMode>$(MSBuildProjectName.Contains('TestMode'))</IsTestMode>
<IsLibrary Condition="'$(IsTestMode)' != 'True' and '$(IsTestProject)' != 'True' and '$(MSBuildProjectExtension)' == '.csproj'">True</IsLibrary>
</PropertyGroup>
<!-- Build configuration -->
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLibrary)' == 'True'">
<OutputPath>..\..\bin\$(Configuration)\</OutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(IsTestMode)' == 'True' and '$(Configuration)'=='Debug'">
<OutputPath>..\..\env\gamemode</OutputPath>
</PropertyGroup>
<!-- Configuration for packages -->
<PropertyGroup Label="Configure default AssemblyInfo">
<Company>Tim Potze</Company>
<Authors>Tim Potze</Authors>
<Copyright>Copyright (c) Tim Potze 2014-$([System.DateTime]::UtcNow.ToString(yyyy))</Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<PropertyGroup Label="Configure default package info" Condition="'$(IsLibrary)' == 'True'">
<PackageProjectUrl>https://github.com/ikkentim/SampSharp-streamer</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>gta samp sampsharp</PackageTags>
<PackageId>$(AssemblyName)</PackageId>
<Product>$(AssemblyName)</Product>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<PropertyGroup Label="Versioning">
<VersionPrefix>0.0.0</VersionPrefix>
<VersionSuffix>local</VersionSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(CiVersion)' != ''" Label="Versioning CI">
<VersionPrefix>$(CiVersion.Split('-', 2)[0])</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition="$(CiVersion.Contains('-'))">$(CiVersion.Split('-', 2)[1])</VersionSuffix>
</PropertyGroup>
<!-- Code analysis -->
<PropertyGroup Label="Configure code analysis">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>
<ItemGroup Condition="'$(IsTestProject)' != 'True' and '$(MSBuildProjectExtension)' == '.csproj'">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.32.0.39516">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Symbols / source linking -->
<PropertyGroup Label="Symbols" Condition="'$(IsLibrary)' == 'True'">
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Label="SourceLink">
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<ItemGroup Condition="'$(IsLibrary)' == 'True'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>