Skip to content

Commit 4931f6d

Browse files
committed
Merge branch 'release/0.16.0'
* release/0.16.0: (#72) Remove modification of strong name keys (#71) Add handling for shouldRunOpenCover argument
2 parents 1089f48 + 6f99fd9 commit 4931f6d

File tree

4 files changed

+147
-325
lines changed

4 files changed

+147
-325
lines changed

Chocolatey.Cake.Recipe/Content/build.cake

-2
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,6 @@ public class Builder
498498
BuildParameters.Tasks.ObfuscateAssembliesTask.IsDependeeOf("Sign-Assemblies");
499499
BuildParameters.Tasks.StrongNameSignerTask.IsDependentOn(prefix + "Restore");
500500
BuildParameters.Tasks.StrongNameSignerTask.IsDependeeOf(prefix + "Build");
501-
BuildParameters.Tasks.ChangeStrongNameSignaturesTask.IsDependentOn(prefix + "Restore");
502-
BuildParameters.Tasks.ChangeStrongNameSignaturesTask.IsDependeeOf(prefix + "Build");
503501
BuildParameters.Tasks.ObfuscateAssembliesTask.IsDependentOn(prefix + "Build");
504502
BuildParameters.Tasks.InspectCodeTask.IsDependentOn(prefix + "Build");
505503
BuildParameters.Tasks.ConfigurationBuilderTask.IsDependentOn(prefix + "Build");

Chocolatey.Cake.Recipe/Content/parameters.cake

+7-13
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ public enum BranchType
99

1010
public static class BuildParameters
1111
{
12-
public static List<string> AllowedAssemblyNames { get; private set; }
13-
public static string AssemblyNamesRegexPattern { get; private set; }
1412
public static BranchType BranchType { get; private set; }
1513
public static PlatformFamily BuildAgentOperatingSystem { get; private set; }
1614
public static string BuildCounter { get; private set; }
@@ -91,7 +89,6 @@ public static class BuildParameters
9189
public static bool ShouldRunReportUnit { get; private set; }
9290
public static bool ShouldRunTransifex { get; set; }
9391
public static bool ShouldRunxUnit { get; private set; }
94-
public static bool ShouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken { get; private set; }
9592
public static bool ShouldStrongNameOutputAssemblies { get; private set; }
9693
public static bool ShouldStrongNameSignDependentAssemblies { get; private set; }
9794
public static DirectoryPath SolutionDirectoryPath { get; private set; }
@@ -137,8 +134,6 @@ public static class BuildParameters
137134

138135
context.Information("Printing Build Parameters...");
139136
context.Information("------------------------------------------------------------------------------------------");
140-
context.Information("AllowedAssemblyName: {0}", string.Join(", ", AllowedAssemblyNames));
141-
context.Information("AssemblyNamesRegexPattern: {0}", AssemblyNamesRegexPattern);
142137
context.Information("BranchType: {0}", BranchType);
143138
context.Information("BranchName: {0}", BuildProvider.Repository.Branch);
144139
context.Information("BuildAgentOperatingSystem: {0}", BuildAgentOperatingSystem);
@@ -202,7 +197,6 @@ public static class BuildParameters
202197
context.Information("ShouldRunReportUnit: {0}", BuildParameters.ShouldRunReportUnit);
203198
context.Information("ShouldRunTransifex: {0}", BuildParameters.ShouldRunTransifex);
204199
context.Information("ShouldRunxUnit: {0}", BuildParameters.ShouldRunxUnit);
205-
context.Information("ShouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken: {0}", BuildParameters.ShouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken);
206200
context.Information("ShouldStrongNameOutputAssemblies: {0}", BuildParameters.ShouldStrongNameOutputAssemblies);
207201
context.Information("ShouldStrongNameSignDependentAssemblies: {0}", BuildParameters.ShouldStrongNameSignDependentAssemblies);
208202
context.Information("SolutionFilePath: {0}", context.MakeAbsolute((FilePath)SolutionFilePath));
@@ -231,8 +225,6 @@ public static class BuildParameters
231225
BuildSystem buildSystem,
232226
DirectoryPath sourceDirectoryPath,
233227
string title,
234-
List<string> allowedAssemblyNames = null,
235-
string assemblyNamesRegexPattern = null,
236228
string certificateSubjectName = null,
237229
string developBranchName = "develop",
238230
FilePath fullReleaseNotesFilePath = null,
@@ -290,7 +282,6 @@ public static class BuildParameters
290282
bool shouldRunReportUnit = true,
291283
bool? shouldRunTransifex = null,
292284
bool shouldRunxUnit = true,
293-
bool shouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken = false,
294285
bool shouldStrongNameOutputAssemblies = true,
295286
bool shouldStrongNameSignDependentAssemblies = true,
296287
DirectoryPath solutionDirectoryPath = null,
@@ -330,8 +321,6 @@ public static class BuildParameters
330321
BuildProvider = GetBuildProvider(context, buildSystem);
331322
RootDirectoryPath = rootDirectoryPath ?? context.MakeAbsolute(context.Environment.WorkingDirectory);
332323

333-
AllowedAssemblyNames = allowedAssemblyNames ?? new List<string> { "chocolatey.dll", "chocolatey.licensed.dll", "ChocolateyGui.Common.dll", "ChocolateyGui.Common.Windows.dll" };
334-
AssemblyNamesRegexPattern = assemblyNamesRegexPattern ?? "chocolatey.lib|chocolatey-licensed.lib|ChocolateyGui.Common|ChocolateyGui.Common.Windows";
335324
BuildAgentOperatingSystem = context.Environment.Platform.Family;
336325
BuildCounter = context.Argument("buildCounter", BuildProvider.Build.Number);
337326
CakeConfiguration = context.GetConfiguration();
@@ -400,11 +389,16 @@ public static class BuildParameters
400389
ShouldRunNuGet = shouldRunNuGet;
401390
ShouldRunNUnit = shouldRunNUnit;
402391
ShouldRunOpenCover = shouldRunOpenCover;
392+
393+
if (context.HasArgument("shouldRunOpenCover"))
394+
{
395+
ShouldRunOpenCover = context.Argument<bool>("shouldRunOpenCover");
396+
}
397+
403398
ShouldRunReportGenerator = shouldRunReportGenerator;
404399
ShouldRunReportUnit = shouldRunReportUnit;
405400
ShouldRunTransifex = shouldRunTransifex ?? TransifexIsConfiguredForRepository(context);
406401
ShouldRunxUnit = shouldRunxUnit;
407-
ShouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken = shouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken;
408402
ShouldStrongNameOutputAssemblies = shouldStrongNameOutputAssemblies;
409403
ShouldStrongNameSignDependentAssemblies = shouldStrongNameSignDependentAssemblies;
410404
SolutionDirectoryPath = solutionDirectoryPath ?? sourceDirectoryPath.Combine(title);
@@ -501,7 +495,7 @@ public static class BuildParameters
501495
}
502496
}
503497

504-
if (ShouldStrongNameOutputAssemblies || ShouldStrongNameSignDependentAssemblies || ShouldStrongNameChocolateyDependenciesWithCurrentPublicKeyToken)
498+
if (ShouldStrongNameOutputAssemblies || ShouldStrongNameSignDependentAssemblies)
505499
{
506500
var officialStrongNameKey = context.EnvironmentVariable("CHOCOLATEY_OFFICIAL_KEY");
507501
var localUnofficialStrongNameKey = RootDirectoryPath.CombineWithFilePath("chocolatey.snk").FullPath;

0 commit comments

Comments
 (0)