Skip to content

Commit fce9759

Browse files
committed
(#992) Provide ability to set ignore of KuduSync
Rather than hard-coding the ignore list, here we have added a ToolSettings property, which will allow this ignore list to be set within the recipe.cake file, to control exactly what files are ignored during a sync. The default value of the ignore list remains the same as it was previously.
1 parent cace39f commit fce9759

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Source/Cake.Recipe/Content/toolsettings.cake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static class ToolSettings
1313
public static int MaxCpuCount { get; private set; }
1414
public static string TargetFrameworkPathOverride { get; private set; }
1515
public static bool SkipDuplicatePackages { get; private set; }
16+
public static string KuduSyncIgnore { get; private set; }
1617

1718
public static string CodecovTool { get; private set; }
1819
public static string CoverallsTool { get; private set; }
@@ -93,7 +94,8 @@ public static class ToolSettings
9394
MSBuildToolVersion buildMSBuildToolVersion = MSBuildToolVersion.Default,
9495
int? maxCpuCount = null,
9596
DirectoryPath targetFrameworkPathOverride = null,
96-
bool skipDuplicatePackages = false
97+
bool skipDuplicatePackages = false,
98+
string kuduSyncIgnore = null
9799
)
98100
{
99101
context.Information("Setting up tools...");
@@ -105,6 +107,7 @@ public static class ToolSettings
105107
BuildPlatformTarget = buildPlatformTarget ?? PlatformTarget.MSIL;
106108
BuildMSBuildToolVersion = buildMSBuildToolVersion;
107109
MaxCpuCount = maxCpuCount ?? 0;
110+
KuduSyncIgnore = kuduSyncIgnore ?? ".git;CNAME";
108111
if (BuildParameters.ShouldUseTargetFrameworkPath && targetFrameworkPathOverride == null)
109112
{
110113
if (context.Environment.Runtime.IsCoreClr)

Source/Cake.Recipe/Content/wyam.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void PublishDocumentation()
171171

172172
Information("Sync output files...");
173173
Kudu.Sync(BuildParameters.Paths.Directories.PublishedDocumentation, publishFolder, new KuduSyncSettings {
174-
ArgumentCustomization = args=>args.Append("--ignore").AppendQuoted(".git;CNAME")
174+
ArgumentCustomization = args=>args.Append("--ignore").AppendQuoted(ToolSettings.KuduSyncIgnore)
175175
});
176176

177177
if (GitHasUncommitedChanges(publishFolder))

0 commit comments

Comments
 (0)