This commit is contained in:
jonsequitur 2017-03-09 18:36:05 -08:00
commit 58bf70a476
100 changed files with 845 additions and 376 deletions

View file

@ -1,6 +1,6 @@
<Project ToolsVersion="14.0">
<PropertyGroup>
<SdkBrandName>Microsoft .NET Core 2.0.0 - SDK Alpha</SdkBrandName>
<SdkBrandName>Microsoft .NET Core 2.0.0 - SDK Preview 1</SdkBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core 2.0.0 - Runtime</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core 2.0.0 - Host</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core 2.0.0 - Host FX Resolver</HostFxrBrandName>

View file

@ -2,7 +2,12 @@
<PropertyGroup>
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;Compile;Test;Package;Publish</CLITargets>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<IncludeAdditionalSharedFrameworks Condition=" '$(IncludeAdditionalSharedFrameworks)' == '' ">true</IncludeAdditionalSharedFrameworks>
<HasAdditionalSharedFramework Condition="'$(Rid)' != 'linux-x64' AND
'$(Rid)' != 'ubuntu.16.10-x64' AND
'$(Rid)' != 'fedora.24-x64' AND
'$(Rid)' != 'opensuse.42.1-x64'">true</HasAdditionalSharedFramework>
<IncludeAdditionalSharedFrameworks Condition=" '$(IncludeAdditionalSharedFrameworks)' == '' AND '$(HasAdditionalSharedFramework)' == 'true' ">true</IncludeAdditionalSharedFrameworks>
<IncludeAdditionalSharedFrameworks Condition=" '$(IncludeAdditionalSharedFrameworks)' == '' ">false</IncludeAdditionalSharedFrameworks>
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
</PropertyGroup>

39
build/BuildInfo.targets Normal file
View file

@ -0,0 +1,39 @@
<Project ToolsVersion="15.0">
<Target Name="WriteBuildInfoProps"
DependsOnTargets="BuildDotnetCliBuildFramework">
<GetCurrentRuntimeInformation>
<Output TaskParameter="Rid" PropertyName="HostRid" />
<Output TaskParameter="OSName" PropertyName="HostOSName" />
</GetCurrentRuntimeInformation>
<PropertyGroup>
<Rid Condition=" '$(Rid)' == '' ">$(HostRid)</Rid>
<Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
<OSName Condition=" '$(OSName)' == '' ">$(HostOSName)</OSName>
<BuildInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;Rid&gt;$(Rid)&lt;/Rid&gt;
&lt;Architecture&gt;$(Architecture)&lt;/Architecture&gt;
&lt;OSName&gt;$(OSName)&lt;/OSName&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</BuildInfoPropsContent>
<ExistingBuildInfoPropsContent Condition=" Exists('$(BuildInfoProps)') ">
$([System.IO.File]::ReadAllText($(BuildInfoProps)))
</ExistingBuildInfoPropsContent>
<ShouldOverwriteBuildInfoPropsFile>false</ShouldOverwriteBuildInfoPropsFile>
<ShouldOverwriteBuildInfoPropsFile
Condition=" '$(ExistingBuildInfoPropsContent.Trim())' != '$(BuildInfoPropsContent.Trim())' ">true</ShouldOverwriteBuildInfoPropsFile>
</PropertyGroup>
<WriteLinesToFile File="$(BuildInfoProps)"
Lines="$(BuildInfoPropsContent)"
Condition=" '$(ShouldOverwriteBuildInfoPropsFile)' == 'true' "
Overwrite="true" />
</Target>
</Project>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.0.0-beta-001675-00</CLI_SharedFrameworkVersion>
<CLI_SharedFrameworkVersion>2.0.0-beta-001697-00</CLI_SharedFrameworkVersion>
<CLI_MSBuild_Version>15.2.0-preview-000047-02</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
<CLI_NETSDK_Version>1.1.0-alpha-20170303-2</CLI_NETSDK_Version>
<CLI_NETSDK_Version>1.1.0-alpha-20170306-2</CLI_NETSDK_Version>
<CLI_NuGet_Version>4.3.0-beta1-2342</CLI_NuGet_Version>
<CLI_WEBSDK_Version>1.0.0-alpha-20170130-3-281</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.0.0</CLI_TestPlatform_Version>

View file

@ -10,10 +10,17 @@
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
</Exec>
<ItemGroup>
<GitInfoCommitCountLines Include="$(GitInfoCommitCount)" />
<GitInfoCommitHashLines Include="$(GitInfoCommitHash)" />
</ItemGroup>
<PropertyGroup>
<ShouldOverWriteThePropsFile
Condition=" '$(CommitCount)' != '$(GitInfoCommitCount)' Or
'$(CommitHash)' != '$(GitInfoCommitHash)' ">true</ShouldOverWriteThePropsFile>
<!-- Batching in GitInfoCommitCount and GitInfoCommitHash here ensures that the property contains only the last line of the output -->
<GitInfoCommitCount>%(GitInfoCommitCountLines.Identity)</GitInfoCommitCount>
<GitInfoCommitCount>$(GitInfoCommitCount.PadLeft(6,'0'))</GitInfoCommitCount>
<GitInfoCommitHash>%(GitInfoCommitHashLines.Identity)</GitInfoCommitHash>
<GitCommitInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
@ -23,11 +30,19 @@
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</GitCommitInfoPropsContent>
<ExistingGitCommitInfoProps Condition=" Exists('$(GitCommitInfoProps)') ">
$([System.IO.File]::ReadAllText($(GitCommitInfoProps)))
</ExistingGitCommitInfoProps>
<ShouldOverwriteGitCommitInfoPropsFile>false</ShouldOverwriteGitCommitInfoPropsFile>
<ShouldOverwriteGitCommitInfoPropsFile
Condition=" '$(ExistingGitCommitInfoProps.Trim())' != '$(GitCommitInfoPropsContent.Trim())' ">true</ShouldOverwriteGitCommitInfoPropsFile>
</PropertyGroup>
<WriteLinesToFile File="$(GitCommitInfoProps)"
Lines="$(GitCommitInfoPropsContent)"
Condition=" '$(ShouldOverwriteThePropsFile)' == 'true' "
Condition=" '$(ShouldOverwriteGitCommitInfoPropsFile)' == 'true' "
Overwrite="true" />
</Target>
</Project>

View file

@ -2,10 +2,9 @@
<Target Name="WriteHostInfoProps"
Condition=" !Exists('$(HostInfoProps)') "
DependsOnTargets="BuildDotnetCliBuildFramework">
<!-- Current Runtime Information -->
<GetCurrentRuntimeInformation>
<Output TaskParameter="Rid" PropertyName="HostRid" />
<Output TaskParameter="Architecture" PropertyName="HostArchitecture" />
<Output TaskParameter="OSName" PropertyName="HostOSName" />
</GetCurrentRuntimeInformation>
@ -13,9 +12,8 @@
<HostInfoPropsContent>
&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;Rid&gt;$(HostRid)&lt;/Rid&gt;
&lt;Architecture&gt;$(HostArchitecture)&lt;/Architecture&gt;
&lt;OSName&gt;$(HostOSName)&lt;/OSName&gt;
&lt;HostRid&gt;$(HostRid)&lt;/HostRid&gt;
&lt;HostOSName&gt;$(HostOSName)&lt;/HostOSName&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;
</HostInfoPropsContent>

View file

@ -3,5 +3,6 @@
<GeneratedPropsDir>$(RepoRoot)/artifacts/obj</GeneratedPropsDir>
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
</PropertyGroup>
</Project>

View file

@ -3,7 +3,8 @@
DependsOnTargets="BuildDotnetCliBuildFramework;
EnsureGeneratedPropsDirectory;
WriteGitCommitInfoProps;
WriteHostInfoProps"/>
WriteHostInfoProps;
WriteBuildInfoProps"/>
<Target Name="EnsureGeneratedPropsDirectory">
<MakeDir Condition=" !Exists('$(GeneratedPropsDir)') "

View file

@ -7,11 +7,19 @@
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages" />
<Target Name="Init"
DependsOnTargets="SetTelemetryProfile;
DependsOnTargets="PrintBuildInfo;
SetTelemetryProfile;
BuildDotnetCliBuildFramework;
CheckPrereqs;">
</Target>
<Target Name="PrintBuildInfo">
<Message Text="Host info - Rid: $(HostRid), OSName: $(HostOSName)" Importance="High" />
<Message Text="Build info - Rid: $(Rid), Architecture: $(Architecture), OSName: $(OSName)" Importance="High" />
<Message Text="If you intended to use a different Rid, Architecture, or OSName run the following command to generate your build state:" Importance="High" />
<Message Text="dotnet msbuild build.proj /p:Architecture=Architecture /p:Rid=Rid /p:OSName=OSName /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles" Importance="High" />
</Target>
<Target Name="SetTelemetryProfile"
DependsOnTargets="BuildDotnetCliBuildFramework" >
<SetEnvVar Name="DOTNET_CLI_TELEMETRY_PROFILE" Value="$(DOTNET_CLI_TELEMETRY_PROFILE);https://github.com/dotnet/cli;$(CommitHash)" />

View file

@ -3,7 +3,7 @@
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<VersionPatch>0</VersionPatch>
<ReleaseSuffix>alpha</ReleaseSuffix>
<ReleaseSuffix>preview1</ReleaseSuffix>
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>

View file

@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0-beta-001509-00</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<DotNetCliToolReference Include="dotnet-deb-tool" Version="2.0.0-*" />