forked from XLibur/XLibur
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
79 lines (66 loc) · 3.57 KB
/
Copy pathDirectory.Build.props
File metadata and controls
79 lines (66 loc) · 3.57 KB
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
<Project>
<!-- Set the repository root into a variable -->
<PropertyGroup>
<SourceRoot>$(MSBuildThisFileDirectory)</SourceRoot>
</PropertyGroup>
<!-- MinVer derives version from git tags (e.g. v0.105.0). Set tag prefix to 'v'. -->
<PropertyGroup>
<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Product>XLibur</Product>
<Authors>XLibur Contributors</Authors>
<Owners>XLibur</Owners>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/XLibur/XLibur</PackageProjectUrl>
<PackageIcon>nuget-logo.png</PackageIcon>
<PackageTags>Excel OpenXml xlsx</PackageTags>
<Description>XLibur is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.</Description>
<RepositoryUrl>https://github.com/XLibur/XLibur</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<!-- Sourcelink: https://github.com/dotnet/sourcelink/ -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors Condition="'$(StrykerEnabled)' != 'true'">true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);NU1605;CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- Make deterministic build (same binary is produced regardless of the machine building it) for CI -->
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' != ''">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<!--
MinVer computes the version inside a target, so the release-notes link has to be
built after that target runs. Setting these as ordinary properties above would
interpolate an empty version (which shipped a broken "releases/tag/" link).
-->
<Target Name="SetPackageReleaseNotesFromVersion" DependsOnTargets="MinVer" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<_XLiburReleaseUrl>https://github.com/XLibur/XLibur/releases/tag/$(MinVerTagPrefix)$(MinVerVersion)</_XLiburReleaseUrl>
<PackageReleaseNotes>See $(_XLiburReleaseUrl)</PackageReleaseNotes>
<PackageDescription>See release notes $(_XLiburReleaseUrl) $(Description)</PackageDescription>
</PropertyGroup>
</Target>
<!--
The analyzer the CI SonarCloud scan runs, so S-rule findings can be reproduced locally instead
of only in CI. Off by default: the codebase carries roughly 4,900 pre-existing S findings, and
TreatWarningsAsErrors would turn every one into a build error.
dotnet build XLibur.slnx -c Release -p:EnableSonarAnalyzers=true
Warnings-as-errors is disabled for that run so it reports rather than fails; real compiler
errors still fail as usual. Analyzer-only, so PrivateAssets keeps it out of the packages.
-->
<PropertyGroup Condition="'$(EnableSonarAnalyzers)' == 'true'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup Condition="'$(EnableSonarAnalyzers)' == 'true'">
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.4.0.108396">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>