-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
76 lines (70 loc) · 3.51 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
75
76
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Bionic Framework Contributors</Authors>
<Product>Bionic Framework</Product>
<Copyright>(c) Bionic Framework Contributors. All rights reserved.</Copyright>
<PackageLicenseUrl>https://raw.githubusercontent.com/BionicFramework/BionicCLI/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BionicFramework/BionicMonitor</PackageProjectUrl>
<PackageIconUrl>https://vectr.com/bmsantos/a2sGndBV8e.svg?width=256&height=256&select=a2sGndBV8epage0</PackageIconUrl>
<PackageTags>ASP.NET Core, Blazor, Bionic, Ionic, Android, iOS, PWA, Electron, Capacitor</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/BionicFramework/BionicMonitor</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
<IsPackable>true</IsPackable>
</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>netcoreapp2.1</TargetFramework>
<TestProjectTargetFramework>netcoreapp2.1</TestProjectTargetFramework>
</PropertyGroup>
<!-- Configure source link: https://github.com/ctaggart/SourceLink -->
<PropertyGroup>
<SourceLinkCreate>true</SourceLinkCreate>
<SourceLinkOriginUrl>https://github.com/BionicFramework/BionicMonitor</SourceLinkOriginUrl>
</PropertyGroup>
<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">1.0.21</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>