-
Notifications
You must be signed in to change notification settings - Fork 4
/
Directory.Build.props
44 lines (39 loc) · 2.16 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
<Project>
<PropertyGroup Label="Compilation Meta">
<TargetFramework>net6.0</TargetFramework>
<Version Condition="'$(Version)' == ''">1.0.0</Version>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<!-- Meta properties: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj -->
<PropertyGroup Label="Assembly Meta">
<Company>Kieranties</Company>
<Copyright>(c) Kieranties</Copyright>
<Description>SimpleVersion - A simple tool to version your code</Description>
<FileVersion>$([System.Text.RegularExpressions.Regex]::Match($(Version), '\d+\.\d+\.\d+').Value).0</FileVersion>
<AssemblyVersion>$([System.Text.RegularExpressions.Regex]::Match($(Version), '\d+\.\d+').Value).0.0</AssemblyVersion>
<InformationalVersion>$(Version)$(VersionSuffix)</InformationalVersion>
</PropertyGroup>
<PropertyGroup Label="Package Meta">
<Authors>Kieran@Kieranties.com</Authors>
<PackageProjectUrl>https://github.com/Kieranties/SimpleVersion</PackageProjectUrl>
<PackageTags>semver;versioning;git</PackageTags>
<RepositoryUrl>https://github.com/Kieranties/SimpleVersion</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageVersion>$([System.Text.RegularExpressions.Regex]::Match($(Version), '^[^\+]+').Value)</PackageVersion>
</PropertyGroup>
<ItemGroup Label="Package Meta">
<None Include="logo.png" Condition="Exists('logo.png')" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)shared\logo.png" Condition="!Exists('logo.png')" Pack="true" PackagePath="\" />
</ItemGroup>
<PropertyGroup Label="Build Attributes">
<TreatWarningsAsErrors Condition="$(Configuration) == 'Release'">true</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors Condition="$(Configuration) == 'Release'">true</MSBuildTreatWarningsAsErrors>
<!-- NU5105 - Usage of semver 2 versioning -->
<NoWarn>$(NoWarn);NU5105</NoWarn>
</PropertyGroup>
<ItemGroup Label="Shared Assets">
<AdditionalFiles Include="$(MSBuildThisFileDirectory)shared/stylecop.json" Link="stylecop.json" />
</ItemGroup>
</Project>