Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void Should_Add_Settings()
var result = fixture.Run();

// Then
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --no-build --no-dependencies --no-restore --nologo --force --self-contained true --source \"https://api.nuget.org/v3/index.json\" --verbosity minimal", result.Args);
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --no-build --no-dependencies --no-restore --nologo --force --self-contained --source \"https://api.nuget.org/v3/index.json\" --verbosity minimal", result.Args);
}

[Fact]
Expand All @@ -147,7 +147,7 @@ public void Should_Add_SelfContained_False_Settings()
var result = fixture.Run();

// Then
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --no-dependencies --no-restore --force --self-contained false --source \"https://api.nuget.org/v3/index.json\" --verbosity minimal", result.Args);
Assert.Equal("publish --output \"/Working/artifacts\" --runtime runtime1 --framework dnxcore50 --configuration Release --version-suffix rc1 --no-dependencies --no-restore --force --no-self-contained --source \"https://api.nuget.org/v3/index.json\" --verbosity minimal", result.Args);
}

[Fact]
Expand Down
5 changes: 2 additions & 3 deletions src/Cake.Common/Tools/DotNet/Publish/DotNetPublisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,13 @@ private ProcessArgumentBuilder GetArguments(string path, DotNetPublishSettings s
// Self contained
if (settings.SelfContained.HasValue)
{
builder.Append("--self-contained");
if (settings.SelfContained.Value)
{
builder.Append("true");
builder.Append("--self-contained");
}
else
{
builder.Append("false");
builder.Append("--no-self-contained");
}
}

Expand Down
Loading