Merge pull request #2060 from dotnet/anurse/fix-osx-build
fix OSX issue in VSO build
This commit is contained in:
commit
21782dd8fb
6 changed files with 56 additions and 21 deletions
|
@ -1,9 +1,8 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
|
@ -22,7 +21,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public Command Exec(string command, params string[] args)
|
||||
{
|
||||
return Command.Create(Path.Combine(BinPath, $"dotnet{Constants.ExeSuffix}"), Enumerable.Concat(new[] { command }, args));
|
||||
var newArgs = args.ToList();
|
||||
newArgs.Insert(0, command);
|
||||
|
||||
if (EnvVars.Verbose)
|
||||
{
|
||||
newArgs.Insert(0, "-v");
|
||||
}
|
||||
|
||||
return Command.Create(Path.Combine(BinPath, $"dotnet{Constants.ExeSuffix}"), newArgs);
|
||||
}
|
||||
|
||||
public Command Restore(params string[] args) => Exec("restore", args);
|
||||
|
|
32
scripts/dotnet-cli-build/Utils/EnvVars.cs
Normal file
32
scripts/dotnet-cli-build/Utils/EnvVars.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class EnvVars
|
||||
{
|
||||
public static readonly bool Verbose = GetBool("DOTNET_BUILD_VERBOSE");
|
||||
|
||||
private static bool GetBool(string name, bool defaultValue = false)
|
||||
{
|
||||
var str = Environment.GetEnvironmentVariable(name);
|
||||
if (string.IsNullOrEmpty(str))
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
switch (str.ToLowerInvariant())
|
||||
{
|
||||
case "true":
|
||||
case "1":
|
||||
case "yes":
|
||||
return true;
|
||||
case "false":
|
||||
case "0":
|
||||
case "no":
|
||||
return false;
|
||||
default:
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
"System.Xml.XmlSerializer": "4.0.11-rc2-23924",
|
||||
"Microsoft.DotNet.Cli.Build.Framework": "1.0.0-*",
|
||||
"WindowsAzure.Storage": "6.2.2-preview",
|
||||
"System.Reflection.Metadata": "1.2.0"
|
||||
"System.Reflection.Metadata": "1.3.0-rc2-23924"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandardapp1.5": {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
},
|
||||
"description": "Types to model a .NET Project",
|
||||
"dependencies": {
|
||||
"System.Reflection.Metadata": "1.2.0-rc2-23924",
|
||||
"System.Reflection.Metadata": "1.3.0-rc2-23924",
|
||||
"NuGet.Packaging": "3.5.0-beta-1068",
|
||||
"Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15996",
|
||||
"Microsoft.Extensions.JsonParser.Sources": {
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
"NuGet.CommandLine.XPlat": "3.5.0-beta-1068",
|
||||
|
||||
"Newtonsoft.Json": "7.0.1",
|
||||
"Microsoft.Net.Compilers.netcore": "1.3.0-beta1-20160225-02",
|
||||
"Microsoft.CodeAnalysis.CSharp": "1.3.0-beta1-20160321-04",
|
||||
"Microsoft.Net.Compilers.netcore": "1.3.0-beta1-20160321-04",
|
||||
"Microsoft.Net.CSharp.Interactive.netcore": "1.3.0-beta1-20160321-04",
|
||||
"Microsoft.FSharp.Compiler.netcore": "1.0.0-alpha-160316",
|
||||
"Microsoft.Net.CSharp.Interactive.netcore": "1.3.0-beta1-20160225-02",
|
||||
"Microsoft.CodeAnalysis.CSharp": "1.3.0-beta1-20160225-02",
|
||||
"System.Text.Encoding.CodePages": "4.0.1-rc2-23924",
|
||||
"System.Diagnostics.FileVersionInfo": "4.0.0-rc2-23924",
|
||||
|
||||
"Microsoft.DiaSymReader.Native": "1.3.3",
|
||||
"System.CommandLine": "0.1.0-e160323-1",
|
||||
"Microsoft.DotNet.ProjectModel": "1.0.0-*",
|
||||
|
@ -51,23 +54,16 @@
|
|||
"Microsoft.Extensions.Testing.Abstractions": "1.0.0-*",
|
||||
"Microsoft.NETCore.ConsoleHost": "1.0.0-rc2-23924",
|
||||
"Microsoft.NETCore.TestHost": "1.0.0-rc2-23924",
|
||||
"NETStandard.Library": "1.5.0-rc2-23924",
|
||||
"System.Reflection.Metadata": "1.3.0-rc2-23924",
|
||||
"System.Diagnostics.TextWriterTraceListener": "4.0.0-rc2-23924",
|
||||
"Microsoft.NETCore.App": "1.0.0-rc2-23924",
|
||||
"System.Diagnostics.TraceSource": "4.0.0-rc2-23924",
|
||||
"System.Linq.Expressions": "4.0.11-rc2-23924",
|
||||
"System.Xml.XDocument": "4.0.11-rc2-23924",
|
||||
"System.Diagnostics.TextWriterTraceListener": "4.0.0-rc2-23924",
|
||||
"System.Resources.ReaderWriter": "4.0.0-rc2-23924",
|
||||
"System.Net.Sockets": "4.1.0-rc2-23924",
|
||||
"System.Threading.ThreadPool": "4.0.10-rc2-23924",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1-rc2-23924",
|
||||
"System.Private.DataContractSerialization": "4.1.1-rc2-23924",
|
||||
"System.Net.Requests": "4.0.11-rc2-23924",
|
||||
"Microsoft.Win32.Registry": {
|
||||
"version": "4.0.0-rc2-23924",
|
||||
"exclude": "compile"
|
||||
},
|
||||
"System.Net.NameResolution": "4.0.0-rc2-23924"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandardapp1.5": {
|
||||
|
|
Loading…
Reference in a new issue