Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<EnumValue Name="Never" />
<EnumValue Name="Always" />
<EnumValue Name="PreserveNewest" />
<EnumValue Name="IfDifferent" />
</EnumProperty>

<BoolProperty Name="BuildAccelerationOnly"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ internal sealed partial class BuildUpToDateCheck
internal enum CopyType
{
PreserveNewest,
IfDifferent,
Always
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ private bool CheckCopyToOutputDirectoryItems(Log log, UpToDateCheckImplicitConfi
switch (copyType)
{
case CopyType.Always:
case CopyType.IfDifferent:
{
// We have already validated the presence of these files, so we don't expect these to return
// false. If one of them does, the corresponding size would be zero, so we would schedule a build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ static BuildUpToDateCheck.CopyType ParseCopyType(string value)
return BuildUpToDateCheck.CopyType.PreserveNewest;
}

throw Assumes.Fail($"CopyToOutputDirectory should be Always or PreserveNewest, not {value}");
if (string.Equals(value, CopyToOutputDirectoryItem.CopyToOutputDirectoryValues.IfDifferent, StringComparisons.PropertyLiteralValues))
{
return BuildUpToDateCheck.CopyType.IfDifferent;
}

throw Assumes.Fail($"CopyToOutputDirectory should be Always, PreserveNewest or IfDifferent, not {value}");
}
}

Expand Down