-
Notifications
You must be signed in to change notification settings - Fork 6
/
Directory.Build.props
68 lines (64 loc) · 3.2 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
<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>
<PackageLicenseUrl>https://github.com/BlazorExtensions/XTerm#license</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BlazorExtensions/XTerm</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/38994076?s%3D128%26v%3D4</PackageIconUrl>
<PackageTags>Microsoft ASP.NET Core Blazor Extensions XTerm</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/BlazorExtensions/XTerm</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
</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>netstandard2.0</TargetFramework>
<TestProjectTargetFramework>netstandard2.0</TestProjectTargetFramework>
</PropertyGroup>
<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">0.2.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>