mirror of
https://github.com/dorssel/usbipd-win.git
synced 2026-11-10 22:50:48 +08:00
99 lines
4.8 KiB
XML
99 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
SPDX-FileCopyrightText: 2021 Frans van Dorsselaer
|
|
|
|
SPDX-License-Identifier: GPL-3.0-only
|
|
-->
|
|
<Project>
|
|
|
|
<PropertyGroup>
|
|
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
|
|
<ContinuousIntegrationBuild Condition="'$(ContinuousIntegrationBuild)' != 'true'">false</ContinuousIntegrationBuild>
|
|
|
|
<!-- Use the latest .NET SDK -->
|
|
<MainTargetFramework>net10.0</MainTargetFramework>
|
|
<!-- Use the latest C# language standard -->
|
|
<LangVersion>14.0</LangVersion>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
|
|
<!-- Be very strict -->
|
|
<WarningLevel>9999</WarningLevel>
|
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
|
<AnalysisLevel>latest-all</AnalysisLevel>
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
<CheckForOverflowUnderflow Condition="'$(Configuration)' == 'Debug'">true</CheckForOverflowUnderflow>
|
|
<NuGetAudit>true</NuGetAudit>
|
|
<NuGetAuditLevel>low</NuGetAuditLevel>
|
|
<NuGetAuditMode>all</NuGetAuditMode>
|
|
|
|
<!-- This allows NuGet restore on Linux (required for Dependabot); however, building requires Windows -->
|
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
|
|
|
<!-- Common defaults -->
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
|
|
<SelfContained>false</SelfContained>
|
|
<IsPackable>false</IsPackable>
|
|
<IsPublishable>false</IsPublishable>
|
|
<GenerateDependencyFile>false</GenerateDependencyFile>
|
|
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
|
<PublishDocumentationFiles>false</PublishDocumentationFiles>
|
|
|
|
<!-- Nerdbank.GitVersioning -->
|
|
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
|
|
<PublicRelease Condition="!$(ContinuousIntegrationBuild)">false</PublicRelease>
|
|
<PublicRelease Condition="'$(GITHUB_REF_NAME)' != 'master'">false</PublicRelease>
|
|
<PublicRelease Condition="'$(Configuration)' != 'Release'">false</PublicRelease>
|
|
<NBGV_SetCloudBuildVersionVars Condition="'$(NBGV_SetCloudBuildVersionVars)' != 'true'">false</NBGV_SetCloudBuildVersionVars>
|
|
|
|
<!-- Bump MSTest.Sdk "transitive" dependencies (they are actually direct dependencies) -->
|
|
<!-- none at this time -->
|
|
|
|
<!-- Deterministic builds -->
|
|
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
|
<RestoreLockedMode Condition="$(ContinuousIntegrationBuild)">true</RestoreLockedMode>
|
|
|
|
<!-- Assembly metadata -->
|
|
<Product>usbipd-win</Product>
|
|
<Company>Frans van Dorsselaer</Company>
|
|
</PropertyGroup>
|
|
|
|
<!-- Required for Dependabot -->
|
|
<PropertyGroup Label="Dependabot" Condition="'$(DEPENDABOT)' == 'true'">
|
|
<RestoreLockedMode>false</RestoreLockedMode>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PrereleaseIdentifier Condition="!$(ContinuousIntegrationBuild)" Include="private" />
|
|
<PrereleaseIdentifier Condition="'$(GITHUB_REF_NAME)' != 'master'" Include="dev" />
|
|
<PrereleaseIdentifier Condition="'$(Configuration)' != 'Release'" Include="debug" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="VersioningFixups" AfterTargets="GetBuildVersion">
|
|
<PropertyGroup>
|
|
<!-- For deterministic builds, use the commit year as the copyright year. -->
|
|
<Copyright>Copyright © $([System.DateTime]::new($(GitCommitDateTicks)).Year) $(Company)</Copyright>
|
|
<!-- We want the full commit hash in the InformationalVersion (but not in the NuGet package version, which has a limit of 64 characters). -->
|
|
<AssemblyInformationalVersion>$(AssemblyInformationalVersion.Split('+')[0])+$(GitCommitId)</AssemblyInformationalVersion>
|
|
<!-- We inject the GitHub run-number as the fourth component of the file version. 0 means "no CI build number" (i.e. a non-CI build). -->
|
|
<AssemblyFileVersion Condition="'$(GITHUB_RUN_NUMBER)' != ''">$(BuildVersion3Components).$(GITHUB_RUN_NUMBER)</AssemblyFileVersion>
|
|
<AssemblyFileVersion Condition="'$(GITHUB_RUN_NUMBER)' == ''">$(BuildVersion3Components).0</AssemblyFileVersion>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<AdditionalThisAssemblyFields Include="Company" String="$(Company)" />
|
|
<AdditionalThisAssemblyFields Include="Copyright" String="$(Copyright)" />
|
|
<AdditionalThisAssemblyFields Include="GitVersionHeight" String="$(GitVersionHeight)" />
|
|
<AdditionalThisAssemblyFields Include="NuGetPackageVersion" String="$(NuGetPackageVersion)" />
|
|
<AdditionalThisAssemblyFields Include="Product" String="$(Product)" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
</Project>
|