Move common repo directories to isolated props file.
Also remove the dev machine BuildNumberMinor workaround per PR feedback, as this is no longer necessary.
This commit is contained in:
Родитель
df6ab9c2a4
Коммит
9555bd94c1
|
@ -0,0 +1,30 @@
|
|||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||
<!-- ProjectDir needs to be set for build-tools and legacy usages. New usages should use RepoRoot -->
|
||||
<ProjectDir>$(RepoRoot)</ProjectDir>
|
||||
<SourceDir>$(RepoRoot)src/</SourceDir>
|
||||
|
||||
<!-- Output directories -->
|
||||
<BinDir Condition="'$(BinDir)'==''">$(RepoRoot)Bin/</BinDir>
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
|
||||
|
||||
<!-- Input Directories -->
|
||||
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages/</PackagesDir>
|
||||
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(RepoRoot)Tools/</ToolRuntimePath>
|
||||
<LocalToolRuntimePath Condition="'$(LocalToolRuntimePath)' == ''">$(ToolRuntimePath)local/</LocalToolRuntimePath>
|
||||
|
||||
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
|
||||
<ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)Tools/</ToolsDir>
|
||||
<BuildToolsTaskCoreDir>$(ToolsDir)</BuildToolsTaskCoreDir>
|
||||
<BuildToolsTaskDesktopDir>$(ToolsDir)net46/</BuildToolsTaskDesktopDir>
|
||||
<BuildToolsTaskDir>$(BuildToolsTaskCoreDir)</BuildToolsTaskDir>
|
||||
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(BuildToolsTaskDesktopDir)</BuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir>$(LocalToolRuntimePath)</LocalBuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(LocalToolRuntimePath)net46/</LocalBuildToolsTaskDir>
|
||||
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
|
||||
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
31
dir.props
31
dir.props
|
@ -24,42 +24,13 @@
|
|||
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Common repo directories -->
|
||||
<PropertyGroup>
|
||||
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
||||
<SourceDir>$(ProjectDir)src/</SourceDir>
|
||||
|
||||
<!-- Output directories -->
|
||||
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)Bin/</BinDir>
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
|
||||
|
||||
<!-- Input Directories -->
|
||||
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
|
||||
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(ProjectDir)Tools/</ToolRuntimePath>
|
||||
<LocalToolRuntimePath Condition="'$(LocalToolRuntimePath)' == ''">$(ToolRuntimePath)local/</LocalToolRuntimePath>
|
||||
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
|
||||
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
|
||||
<BuildToolsTaskDir>$(ToolRuntimePath)</BuildToolsTaskDir>
|
||||
<BuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(ToolsDir)net46/</BuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir>$(LocalToolRuntimePath)</LocalBuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir Condition="'$(MSBuildRuntimeType)' != 'Core'">$(LocalToolRuntimePath)net46/</LocalBuildToolsTaskDir>
|
||||
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
|
||||
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildThisFileDirectory)RepoDirectories.props" />
|
||||
|
||||
<!-- Import Build tools common props file where repo-independent properties are found -->
|
||||
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
|
||||
|
||||
<!-- Versioning -->
|
||||
<PropertyGroup>
|
||||
<!-- Dev builds get a minor version, by default, of '0'. Our tests restore packages with
|
||||
a -* version, and include myget sources, so any package published the same day to myget
|
||||
will conflict with the local build and override the local built package. Prevent this
|
||||
by setting the non-official build minor version to 9 -->
|
||||
<BuildNumberMinor Condition="'$(BuildNumberMinor)' == '0'">9</BuildNumberMinor>
|
||||
|
||||
<VersionSuffix Condition="'$(PreReleaseLabel)' != ''">$(PreReleaseLabel)-</VersionSuffix>
|
||||
<VersionSuffix>$(VersionSuffix)$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix>
|
||||
<VersionSuffix Condition="'$(StabilizePackageVersion)' =='true'"></VersionSuffix>
|
||||
|
|
|
@ -3,17 +3,10 @@
|
|||
<!-- Don't import props files above this folder since they don't work with the .NET Core SDK. -->
|
||||
<!--<Import Project="..\dir.props" />-->
|
||||
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../..'))/</RepoRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)../../RepoDirectories.props" />
|
||||
<Import Project="$(RepoRoot)BranchInfo.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Output directories -->
|
||||
<BinDir Condition="'$(BinDir)'==''">$(RepoRoot)Bin/</BinDir>
|
||||
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
||||
|
||||
<!-- BuildVersion Properties -->
|
||||
<TodayTimeStamp>$([System.DateTime]::Now.ToString(yyyyMMdd))</TodayTimeStamp>
|
||||
<BuildVersionFile Condition="'$(BuildVersionFile)'==''">$(ObjDir)BuildVersion-$(TodayTimeStamp).props</BuildVersionFile>
|
||||
|
@ -35,12 +28,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(StabilizePackageVersion)' != 'true'">
|
||||
<!-- Dev builds get a minor version, by default, of '0'. Our tests restore packages with
|
||||
a -* version, and include myget sources, so any package published the same day to myget
|
||||
will conflict with the local build and override the local built package. Prevent this
|
||||
by setting the non-official build minor version to 9 -->
|
||||
<BuildNumberMinor Condition="'$(BuildNumberMinor)' == '0'">9</BuildNumberMinor>
|
||||
|
||||
<!--
|
||||
Ensure VersionSuffix is always set (especially during 'dotnet restore')
|
||||
to work around https://github.com/NuGet/Home/issues/4337
|
||||
|
@ -77,5 +64,5 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Condition="Exists('$(RepoRoot)Tools/versioning.props')" Project="$(RepoRoot)Tools/versioning.props" />
|
||||
<Import Condition="Exists('$(ToolsDir)versioning.props')" Project="$(ToolsDir)versioning.props" />
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче