-
-
Notifications
You must be signed in to change notification settings - Fork 301
/
Directory.Build.props
63 lines (53 loc) · 2.96 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
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CS1591;NU5128</NoWarn>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
<NuGetAuditMode>direct</NuGetAuditMode>
<DebugSymbols>true</DebugSymbols>
<EnableXlfLocalization>false</EnableXlfLocalization>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign>
<PublicSign>false</PublicSign>
</PropertyGroup>
<PropertyGroup>
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<NetFrameworkTargetFramework
Condition=" '$(NetFrameworkTargetFramework)' == '' ">net48</NetFrameworkTargetFramework>
<NetCoreTargetFramework
Condition=" '$(NetCoreTargetFramework)' == '' ">net8.0</NetCoreTargetFramework>
<NetCoreWindowsTargetFramework
Condition=" '$(NetCoreWindowsTargetFramework)' == '' ">net8.0-windows</NetCoreWindowsTargetFramework>
</PropertyGroup>
<!--
Arcade only allows the revision to contain up to two characters, and GitHub Actions does not roll-over
build numbers every day like Azure DevOps does. To balance these two requirements, set the official
build ID to be the same format as the built-in default from Arcade, except with the revision number
being the number of the quarter hour of the current time of day (24 * 4 = 96, which is less than 100).
So a build between 00:00 and 00:14 would have a revision of 1, and a build between 23:45 and 23:59:59
would have a revision of 97.
-->
<PropertyGroup Condition=" '$(GITHUB_ACTIONS)' == 'true' AND '$(GITHUB_REF.StartsWith(`refs/pull/`))' == 'false' ">
<_Hours>$([MSBuild]::Multiply($([System.DateTime]::Now.ToString(HH)), 4))</_Hours>
<_QuarterHours>$([MSBuild]::Divide($([System.DateTime]::Now.ToString(mm)), 15))</_QuarterHours>
<_QuarterHours>$([System.Math]::Floor($(_QuarterHours)))</_QuarterHours>
<_GitHubActionsBuildRevision>$([MSBuild]::Add($(_Hours), $(_QuarterHours)))</_GitHubActionsBuildRevision>
<_GitHubActionsBuildRevision>$([MSBuild]::Add($(_GitHubActionsBuildRevision), 1))</_GitHubActionsBuildRevision>
<OfficialBuild>true</OfficialBuild>
<OfficialBuildId>$([System.DateTime]::Now.ToString(yyyyMMdd)).$(_GitHubActionsBuildRevision)</OfficialBuildId>
</PropertyGroup>
<ItemGroup>
<ProjectCapability Include="DynamicDependentFile" />
<ProjectCapability Include="DynamicFileNesting" />
</ItemGroup>
</Project>