Skip to content

Commit

Permalink
Update default docker-compose version
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam committed Feb 12, 2022
1 parent b2edbdd commit 0f1580f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void EmptyComposeBuilderTest()
var result = compose.Serialize();

Assert.Equal(
@"version: ""3.7""
@"version: ""3.8""
", result
);
}
Expand All @@ -35,7 +35,7 @@ public void ServiceWithImageTest()
var result = compose.Serialize();

Assert.Equal(
@"version: ""3.7""
@"version: ""3.8""
services:
a-service:
image: ""aviationexam/a-service""
Expand All @@ -58,7 +58,7 @@ public void ServiceWithBuildTest()
var result = compose.Serialize();

Assert.Equal(
@"version: ""3.7""
@"version: ""3.8""
services:
a-service:
image: ""aviationexam/a-service""
Expand Down Expand Up @@ -89,7 +89,7 @@ public void ServiceWithBuildArgumentsTest()
var result = compose.Serialize();

Assert.Equal(
@"version: ""3.7""
@"version: ""3.8""
services:
a-service:
image: ""aviationexam/a-service""
Expand Down
2 changes: 1 addition & 1 deletion src/Aviationexam.DockerComposeBuilder/Builders/Builder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static ServiceBuilder MakeService(string serviceName)

public static ComposeBuilder MakeCompose()
{
return new ComposeBuilder().WithVersion("3.7");
return new ComposeBuilder().WithVersion("3.8");
}

public static VolumeBuilder MakeVolume()
Expand Down
10 changes: 5 additions & 5 deletions src/Aviationexam.DockerComposeBuilder/Builders/ServiceBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Aviationexam.DockerComposeBuilder.Builders
{
public class ServiceBuilder : BaseBuilder<ServiceBuilder, Service>
{
protected BuildBuilder? _buildBuilder;
protected BuildBuilder? BuildBuilder;

internal ServiceBuilder()
{
Expand Down Expand Up @@ -116,9 +116,9 @@ public ServiceBuilder WithLabels(Action<IDictionary<string, string>> environment

public ServiceBuilder WithBuild(Action<BuildBuilder> build)
{
_buildBuilder ??= new BuildBuilder();
BuildBuilder ??= new BuildBuilder();

build(_buildBuilder);
build(BuildBuilder);

return this;
}
Expand Down Expand Up @@ -224,9 +224,9 @@ public ServiceBuilder WithVolumes(params string[] volumes)

public override Service Build()
{
if (_buildBuilder != null)
if (BuildBuilder != null)
{
WorkingObject.Build = _buildBuilder.Build();
WorkingObject.Build = BuildBuilder.Build();
}

return base.Build();
Expand Down

0 comments on commit 0f1580f

Please sign in to comment.