-
Notifications
You must be signed in to change notification settings - Fork 12
/
Directory.Build.props
71 lines (67 loc) · 3.22 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
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Louie Colgan</Authors>
<Product>Ljbc1994.Blazor.IntersectionObserver</Product>
<PackageId>BlazorIntersectionObserver</PackageId>
<Copyright>Copyright © 2021 - Louie Colgan</Copyright>
<Summary>Intersection Observer API wrapper for Blazor</Summary>
<PackageProjectUrl>https://github.com/ljbc1994/BlazorIntersectionObserver</PackageProjectUrl>
<PackageTags>Microsoft ASP.NET Core Blazor Intersection Observer</PackageTags>
<RepositoryUrl>https://github.com/ljbc1994/BlazorIntersectionObserver</RepositoryUrl>
<LicenseUrl>https://github.com/ljbc1994/BlazorIntersectionObserver/blob/master/LICENCE</LicenseUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<PackageReleaseNotes></PackageReleaseNotes>
</PropertyGroup>
<!-- 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>
<LangVersion>8.0</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">dev</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>