Piotrp msft/msbuild/incremental test (#3842)
* Incremental Testing - Part 1 * Fix 'clean' bug * Remove --fallbacksource from TestAssetPackage restore.
This commit is contained in:
parent
caa4cf373c
commit
16bedef2c5
7 changed files with 457 additions and 149 deletions
42
build_projects/dotnet-cli-build/DotNetRestore.cs
Normal file
42
build_projects/dotnet-cli-build/DotNetRestore.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetRestore : DotNetTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
get { return "restore"; }
|
||||
}
|
||||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetVerbosity()} {GetFallbackSource()}"; }
|
||||
}
|
||||
|
||||
public string FallbackSource { get; set; }
|
||||
|
||||
public string Verbosity { get; set; }
|
||||
|
||||
private string GetFallbackSource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(FallbackSource))
|
||||
{
|
||||
return $"--fallbacksource {FallbackSource}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetVerbosity()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Verbosity))
|
||||
{
|
||||
return $"--verbosity {Verbosity}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue