generated from dotnet/new-repo
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Directory.Build.props
92 lines (76 loc) · 5.25 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Provides a way to override ClickOnce configuration. -->
<PropertyGroup>
<ClickOnceConfiguration Condition="'$(ClickOnceConfiguration)' == ''">$(Configuration)</ClickOnceConfiguration>
</PropertyGroup>
<PropertyGroup Label="CalculateTargetOS">
<BuildOS>linux</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('HAIKU'))">haiku</BuildOS>
<BuildOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows</BuildOS>
<TargetOS Condition="'$(TargetOS)' == ''">$(BuildOS)</TargetOS>
<HostOS Condition="'$(HostOS)' == ''">$(TargetOS)</HostOS>
</PropertyGroup>
<PropertyGroup Label="CalculateArch">
<!-- Build architecture is what we are building on. -->
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</BuildArchitecture>
<!-- The target architecture is the what the customer is targeting their outputs to run on. -->
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$(BuildArchitecture)</TargetArchitecture>
<!-- The host architecture is the what the customer will build on. Much of the time, Host==Target. -->
<HostArchitecture Condition="'$(HostArchitecture)' == ''">$(TargetArchitecture)</HostArchitecture>
</PropertyGroup>
<PropertyGroup Label="CalculateRID">
<BuildRid Condition="'$(BuildRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</BuildRid>
<BuildRid Condition="'$(BuildRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</BuildRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(BuildRid.Substring(0, $(BuildRid.LastIndexOf('-'))))-$(TargetArchitecture)</TargetRid>
<HostRid Condition="'$(HostRid)' == ''">$(TargetRid)</HostRid>
<!-- Source-only builds are non portable, except for cross-builds.
Source-only cross-builds default to the portable configuration so the resulting SDK works on a wider range of distros. -->
<PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(BuildArchitecture)' == '$(TargetArchitecture)'">false</PortableBuild>
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'freebsd'">freebsd-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'osx'">osx-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'linux'">linux-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="$(TargetRid.StartsWith('linux-musl')) or $(TargetRid.StartsWith('alpine'))">linux-musl-$(TargetArchitecture)</PortableRid>
<PortableRid Condition="'$(PortableRid)' == '' and '$(TargetOS)' == 'windows'">win-$(TargetArchitecture)</PortableRid>
<TargetRid Condition="'$(PortableBuild)' == 'true' and '$(PortableRid)' != ''">$(PortableRid)</TargetRid>
</PropertyGroup>
<!-- Packaging properties -->
<PropertyGroup>
<!--
This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used
to find source code for debugging. It is also used to name the build output manifest for orchestrated builds.
-->
<GitHubRepositoryName>deployment-tools</GitHubRepositoryName>
<RepositoryUrl>https://github.com/dotnet/deployment-tools</RepositoryUrl>
<ProjectUrl>https://github.com/dotnet/deployment-tools</ProjectUrl>
<LicenseUrl>https://github.com/dotnet/deployment-tools/blob/main/LICENSE.TXT</LicenseUrl>
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
<ThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</ThirdPartyNoticesFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
<!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
<IsPrerelease>true</IsPrerelease>
</PropertyGroup>
<ItemGroup>
<Content Include="$(LicenseFile)"
Pack="true"
PackagePath="/" />
<Content Include="$(ThirdPartyNoticesFile)"
Pack="true"
PackagePath="/" />
</ItemGroup>
<PropertyGroup>
<!-- Language configuration -->
<Deterministic>true</Deterministic>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleset>$(RepositoryEngineeringDir)CodeAnalysis.ruleset</CodeAnalysisRuleset>
<!-- Only upgrade NuGetAudit warnings to errors for official builds. -->
<WarningsNotAsErrors Condition="'$(OfficialBuild)' != 'true'">$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
</Project>