This commit is contained in:
Justin Goshi 2017-02-08 19:13:30 -08:00
parent b419f25d67
commit 2eac755db7
10 changed files with 36 additions and 45 deletions

View file

@ -2,16 +2,6 @@
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="build/Microsoft.DotNet.Cli.Monikers.props" />
<ImportGroup Condition=" '$(GeneratingPropsFile)' == 'true' ">
<Import Condition=" Exists('$(GitCommitInfoProps)') "
Project="$(GitCommitInfoProps)" />
<Import Condition=" Exists('$(HostInfoProps)') "
Project="$(HostInfoProps)" />
</ImportGroup>
<ImportGroup Condition=" '$(GeneratingPropsFile)' != 'true' ">
<Import Project="$(GitCommitInfoProps)" />
<Import Project="$(HostInfoProps)" />
</ImportGroup>
<PropertyGroup>
<!--
@ -83,20 +73,5 @@
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
</Target>
<Target Name="WriteDynamicPropsToStaticPropsFiles"
DependsOnTargets="BuildDotnetCliBuildFramework;
WriteGitCommitInfoProps;
WriteHostInfoProps"/>
<Target DependsOnTargets="$(CLITargets)" Name="BuildTheWholeCli"></Target>
<Import Project="build/Microsoft.DotNet.Cli.GitCommitInfo.targets" />
<Import Project="build/Microsoft.DotNet.Cli.HostInfo.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Prepare.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Compile.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Package.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Test.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Publish.targets" />
<Import Project="build/Microsoft.DotNet.Cli.Run.targets" />
<Import Project="build/Microsoft.DotNet.Cli.InitRepo.targets" />
</Project>

View file

@ -1,6 +1,4 @@
<Project ToolsVersion="15.0">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<BundledSdk Include="NuGet.Build.Tasks.Pack" Version="$(CLI_NuGet_Version)" />
<BundledSdk Include="Microsoft.NET.Sdk" Version="$(CLI_NETSDK_Version)" />

View file

@ -1,6 +1,4 @@
<Project ToolsVersion="15.0">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<BundledTemplate Include="Microsoft.DotNet.Common.ItemTemplates" Version="$(TemplateEngineVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates" Version="$(TemplateEngineVersion)" />

View file

@ -1,6 +1,5 @@
<Project ToolsVersion="15.0">
<Target Name="WriteGitCommitInfoProps"
Condition=" !Exists('$(GitCommitInfoProps)') "
DependsOnTargets="BuildDotnetCliBuildFramework">
<GetCommitHash RepoRoot="$(RepoRoot)">
<Output TaskParameter="CommitHash" PropertyName="GitInfoCommitHash" />
@ -35,8 +34,6 @@
</GitCommitInfoPropsContent>
</PropertyGroup>
<MakeDir Directories="$(GeneratedPropsDir)" />
<WriteLinesToFile File="$(GitCommitInfoProps)"
Lines="$(GitCommitInfoPropsContent)"
Condition=" '$(ShouldOverwriteThePropsFile)' == 'true' "/>

View file

@ -21,8 +21,6 @@
</HostInfoPropsContent>
</PropertyGroup>
<MakeDir Directories="$(GeneratedPropsDir)" />
<WriteLinesToFile File="$(HostInfoProps)"
Lines="$(HostInfoPropsContent)" />
</Target>

View file

@ -0,0 +1,7 @@
<Project ToolsVersion="15.0">
<PropertyGroup>
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir>
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,23 @@
<Project ToolsVersion="15.0">
<Target Name="WriteDynamicPropsToStaticPropsFiles"
DependsOnTargets="BuildDotnetCliBuildFramework;
EnsureGeneratedPropsDirectory;
WriteGitCommitInfoProps;
WriteHostInfoProps"/>
<Target Name="EnsureGeneratedPropsDirectory">
<MakeDir Condition=" !Exists('$(GeneratedPropsDir)') "
Directories="$(GeneratedPropsDir)" />
</Target>
<Target Name="BuildTheWholeCli" DependsOnTargets="$(CLITargets)" />
<Import Project="Microsoft.DotNet.Cli.GitCommitInfo.targets" />
<Import Project="Microsoft.DotNet.Cli.HostInfo.targets" />
<Import Project="Microsoft.DotNet.Cli.Prepare.targets" />
<Import Project="Microsoft.DotNet.Cli.Compile.targets" />
<Import Project="Microsoft.DotNet.Cli.Package.targets" />
<Import Project="Microsoft.DotNet.Cli.Test.targets" />
<Import Project="Microsoft.DotNet.Cli.Publish.targets" />
<Import Project="Microsoft.DotNet.Cli.Run.targets" />
</Project>

View file

@ -4,7 +4,6 @@
<Import Project="prepare/CheckPrereqs.targets" />
<Import Project="Microsoft.DotNet.Cli.BundledSdks.props" />
<Import Project="Microsoft.DotNet.Cli.BundledTemplates.props" />
<Import Project="Microsoft.DotNet.Cli.DependencyVersions.props" />
<Target Name="Prepare"
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;ZipTemplates" />

View file

@ -1,6 +1,4 @@
<Project ToolsVersion="14.0" DefaultTargets="Test">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<PathSeparator>/</PathSeparator>
<PathSeparator Condition=" '$(OSName)' == 'win' ">\</PathSeparator>

View file

@ -1,15 +1,8 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="build/Microsoft.DotNet.Cli.DependencyVersions.props" />
<!-- NuGet Information -->
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir>
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
@ -27,4 +20,9 @@
<CliTargetFramework>netcoreapp2.0</CliTargetFramework>
</PropertyGroup>
<Import Project="build/Microsoft.DotNet.Cli.InitRepo.props" />
<Import Condition=" Exists('$(GitCommitInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
<Import Condition=" Exists('$(HostInfoProps)') Or '$(GeneratingPropsFile)' != 'true' " Project="$(HostInfoProps)" />
<Import Project="build/Microsoft.DotNet.Cli.DependencyVersions.props" />
</Project>