-
Notifications
You must be signed in to change notification settings - Fork 32
/
Directory.Build.props
74 lines (69 loc) · 3.33 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
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Blazor Extensions Contributors</Authors>
<Product>Blazor Extensions</Product>
<Copyright>(c) Blazor Extensions Contributors. All rights reserved.</Copyright>
<PackageLicense>LICENSE</PackageLicense>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
<PackageIcon>BlazorExtensions.png</PackageIcon>
<PackageTags>Microsoft ASP.NET Core Blazor Extensions Logging</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>
<ItemGroup>
<None Include="BlazorExtensions.png" Pack="true" PackagePath=""/>
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>
<!-- Common compile parameters -->
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TestProjectTargetFramework>net5.0</TestProjectTargetFramework>
</PropertyGroup>
<!-- Versioning properties -->
<!-- <PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">rc1-020501</VersionSuffix>
</PropertyGroup> -->
<Choose>
<When Condition="'$(OfficialBuild)' != 'true'">
<!-- On non-official builds we don't burn in a git sha. In large part because it
hurts our determinism efforts as binaries which should be the same between
builds will not (due to developers building against different HEAD
values -->
<PropertyGroup>
<GitHeadSha><developer build></GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
<PropertyGroup>
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
<PropertyGroup>
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GitHeadSha>Not found</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>
</Otherwise>
</Choose>
</Project>