More build cleanup and tweaks

- Added generic Get<T> to build context
This commit is contained in:
David Fowler 2016-02-15 10:07:39 -08:00
parent 078d6a8d5f
commit c7e9139fa6
4 changed files with 17 additions and 15 deletions

View file

@ -1,9 +1,9 @@
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.Extensions.PlatformAbstractions;
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.Extensions.PlatformAbstractions;
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
@ -19,7 +19,7 @@ namespace Microsoft.DotNet.Cli.Build
// Set up the environment variables previously defined by common.sh/ps1
// This is overkill, but I want to cover all the variables used in all OSes (including where some have the same names)
var buildVersion = (BuildVersion)c.BuildContext["BuildVersion"];
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
var env = new Dictionary<string, string>()
{
{ "RID", PlatformServices.Default.Runtime.GetRuntimeIdentifier() },