Add --self-contained to publish.
This flows to the $(SelfContained) property added in https://github.com/dotnet/sdk/pull/1053
This commit is contained in:
parent
a616c04a38
commit
ab15200500
6 changed files with 95 additions and 16 deletions
|
@ -13,7 +13,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string _output;
|
||||
private string _runtime;
|
||||
private List<string> _profileFilterProject = new List<string>();
|
||||
|
||||
private bool? _selfContained;
|
||||
|
||||
public PublishCommand WithFramework(string framework)
|
||||
{
|
||||
_framework = framework;
|
||||
|
@ -37,12 +38,18 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
return this;
|
||||
}
|
||||
|
||||
public PublishCommand WithProFileProject(string profileproj)
|
||||
public PublishCommand WithProfileProject(string profileproj)
|
||||
{
|
||||
_profileFilterProject.Add( $" --filter {profileproj}");
|
||||
return this;
|
||||
}
|
||||
|
||||
public PublishCommand WithSelfContained(bool value)
|
||||
{
|
||||
_selfContained = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public override CommandResult Execute(string args = "")
|
||||
{
|
||||
args = $"publish {BuildArgs()} {args}";
|
||||
|
@ -61,7 +68,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
FrameworkOption,
|
||||
OutputOption,
|
||||
ProfileProjOption,
|
||||
RuntimeOption);
|
||||
RuntimeOption,
|
||||
SelfContainedOption);
|
||||
}
|
||||
|
||||
private string FrameworkOption => string.IsNullOrEmpty(_framework) ? "" : $"-f {_framework}";
|
||||
|
@ -71,5 +79,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private string RuntimeOption => string.IsNullOrEmpty(_runtime) ? "" : $"-r {_runtime}";
|
||||
|
||||
private string ProfileProjOption => string.Join(" ", _profileFilterProject);
|
||||
|
||||
private string SelfContainedOption => _selfContained.HasValue ? $"--self-contained:{_selfContained.Value}" : "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue