Skip to content

Commit

Permalink
Update ContainerCompositionService and DotNetSdkLiterals (#220)
Browse files Browse the repository at this point in the history
This commit introduces changes to the ContainerCompositionService and DotNetSdkLiterals source files. Specifically in the ContainerCompositionService file, it modifies the PublishProfileArgument to ContainerTargetArgument, with an empty string value. A few additions were also made to the DotNetSdkLiterals file, including the addition of the ContainerTargetArgument and the removal of the ContainerPublishProfile constant.
  • Loading branch information
prom3theu5 authored Jun 7, 2024
1 parent 030d006 commit b92a3ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System;

namespace Aspirate.Services.Implementations;

public sealed class ContainerCompositionService(
Expand Down Expand Up @@ -192,7 +194,7 @@ private async Task AddProjectPublishArguments(ArgumentsBuilder argumentsBuilder,

argumentsBuilder
.AppendArgument(DotNetSdkLiterals.PublishArgument, fullProjectPath)
.AppendArgument(DotNetSdkLiterals.PublishProfileArgument, DotNetSdkLiterals.ContainerPublishProfile)
.AppendArgument(DotNetSdkLiterals.ContainerTargetArgument, string.Empty, quoteValue: false)
.AppendArgument(DotNetSdkLiterals.PublishSingleFileArgument, msbuildProperties.Properties.PublishSingleFile)
.AppendArgument(DotNetSdkLiterals.PublishTrimmedArgument, msbuildProperties.Properties.PublishTrimmed)
.AppendArgument(DotNetSdkLiterals.SelfContainedArgument, DotNetSdkLiterals.DefaultSelfContained)
Expand Down
2 changes: 1 addition & 1 deletion src/Aspirate.Shared/Literals/DotNetSdkLiterals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static class DotNetSdkLiterals
public const string NoLogoArgument = "--nologo";
public const string LaunchProfileArgument = "--launch-profile";
public const string RuntimeIdentifierArgument = "-r";
public const string ContainerTargetArgument = "-t:PublishContainer";
public const string OsArgument = "--os";
public const string ArchArgument = "--arch";
public const string GetPropertyArgument = "--getProperty";
Expand All @@ -34,7 +35,6 @@ public static class DotNetSdkLiterals
public const string ContainerImageTagArguments = $"-p:{MsBuildPropertiesLiterals.ContainerImageTagArguments}";
public const string ErrorOnDuplicatePublishOutputFilesArgument = $"-p:{MsBuildPropertiesLiterals.ErrorOnDuplicatePublishOutputFilesArgument}";

public const string ContainerPublishProfile = "DefaultContainer";
public const string DefaultSingleFile = "true";
public const string DefaultSelfContained = "true";
public const string DefaultPublishTrimmed = "false";
Expand Down

0 comments on commit b92a3ea

Please sign in to comment.