Skip to content

Commit 4586551

Browse files
committed
cleanup
1 parent 1ac5904 commit 4586551

File tree

15 files changed

+22
-54
lines changed

15 files changed

+22
-54
lines changed

build/CI.sln.DotSettings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OS/@EntryIndexedValue">OS</s:String>
33
<s:Boolean x:Key="/Default/UserDictionary/Words/=Addins/@EntryIndexedValue">True</s:Boolean>
4-
<s:Boolean x:Key="/Default/UserDictionary/Words/=endgroup/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
4+
<s:Boolean x:Key="/Default/UserDictionary/Words/=endgroup/@EntryIndexedValue">True</s:Boolean>
5+
<s:Boolean x:Key="/Default/UserDictionary/Words/=opencontainers/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

build/artifacts/BuildContext.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

33
namespace Artifacts;
44

5-
public class BuildContext : BuildContextBase
5+
public class BuildContext(ICakeContext context) : BuildContextBase(context)
66
{
77
public string MsBuildConfiguration { get; } = Constants.DefaultConfiguration;
88

99
public bool IsDockerOnLinux { get; set; }
1010

1111
public IEnumerable<DockerImage> Images { get; set; } = new List<DockerImage>();
12-
13-
public BuildContext(ICakeContext context) : base(context)
14-
{
15-
}
1612
}

build/build/BuildContext.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Build;
55

6-
public class BuildContext : BuildContextBase
6+
public class BuildContext(ICakeContext context) : BuildContextBase(context)
77
{
88
public string MsBuildConfiguration { get; set; } = Constants.DefaultConfiguration;
99

@@ -19,8 +19,4 @@ public class BuildContext : BuildContextBase
1919
public Credentials? Credentials { get; set; }
2020

2121
public DotNetMSBuildSettings MsBuildSettings { get; } = new();
22-
23-
public BuildContext(ICakeContext context) : base(context)
24-
{
25-
}
2622
}

build/build/Tasks/ValidateVersion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ValidateVersion : FrostingTask<BuildContext>
99
{
1010
public override void Run(BuildContext context)
1111
{
12-
var gitversionTool = context.GetGitVersionToolLocation();
13-
context.ValidateOutput("dotnet", $"\"{gitversionTool}\" -version", context.Version!.GitVersion!.InformationalVersion!);
12+
var gitVersionTool = context.GetGitVersionToolLocation();
13+
context.ValidateOutput("dotnet", $"\"{gitVersionTool}\" -version", context.Version!.GitVersion!.InformationalVersion!);
1414
}
1515
}

build/build/Utilities/Credentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public class Credentials
88

99
public static Credentials GetCredentials(ICakeContext context) => new()
1010
{
11-
CodeCov = new CodeCovCredentials(context.EnvironmentVariable("CODECOV_TOKEN")),
11+
CodeCov = new(context.EnvironmentVariable("CODECOV_TOKEN")),
1212
};
1313
}

build/chores/BuildContext.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
namespace Chores;
22

3-
public class BuildContext : FrostingContext
4-
{
5-
public BuildContext(ICakeContext context) : base(context)
6-
{
7-
}
8-
}
3+
public class BuildContext(ICakeContext context) : FrostingContext(context);

build/common/Utilities/TaskArgumentsAttribute.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@ namespace Common.Utilities;
55
/// </summary>
66
/// <seealso cref="Attribute" />
77
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
8-
public class TaskArgumentAttribute : Attribute
8+
public class TaskArgumentAttribute(string name, params string[] possibleValues) : Attribute
99
{
10-
public string Name { get; }
11-
public string[] PossibleValues { get; }
12-
public TaskArgumentAttribute(string name, params string[] possibleValues)
13-
{
14-
Name = name;
15-
PossibleValues = possibleValues;
16-
}
10+
public string Name { get; } = name;
11+
public string[] PossibleValues { get; } = possibleValues;
1712
}

build/docker/BuildContext.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33

44
namespace Docker;
55

6-
public class BuildContext : BuildContextBase
6+
public class BuildContext(ICakeContext context) : BuildContextBase(context)
77
{
88
public Credentials? Credentials { get; set; }
99
public bool IsDockerOnLinux { get; set; }
1010

1111
public IEnumerable<DockerImage> Images { get; set; } = new List<DockerImage>();
1212
public DockerRegistry DockerRegistry { get; set; }
1313
public ICollection<Architecture> Architectures { get; set; } = new List<Architecture>();
14-
15-
public BuildContext(ICakeContext context) : base(context)
16-
{
17-
}
1814
}

build/docker/Utilities/Credentials.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class Credentials
88

99
public static Credentials GetCredentials(ICakeContext context) => new()
1010
{
11-
DockerHub = new DockerHubCredentials(
11+
DockerHub = new(
1212
context.EnvironmentVariable("DOCKER_USERNAME"),
1313
context.EnvironmentVariable("DOCKER_PASSWORD")),
1414
};

build/docs/BuildContext.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44

55
namespace Docs;
66

7-
public class BuildContext : BuildContextBase
7+
public class BuildContext(ICakeContext context) : BuildContextBase(context)
88
{
99
public bool ForcePublish { get; set; }
1010
public Credentials? Credentials { get; set; }
1111
public WyamSettings? WyamSettings { get; set; }
12-
13-
public BuildContext(ICakeContext context) : base(context)
14-
{
15-
}
1612
}

0 commit comments

Comments
 (0)