Skip to content

Commit

Permalink
Remove faulty CompareFiles task
Browse files Browse the repository at this point in the history
The task was faulty because it assumed `Stream.Read` would fill the buffer if at all possible. But we also don't need it, since the `Copy` task itself has similar functionality.

Fixes #825
  • Loading branch information
AArnott committed Sep 25, 2022
1 parent b6c02c4 commit d1d0017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 139 deletions.
129 changes: 0 additions & 129 deletions src/Nerdbank.GitVersioning.Tasks/CompareFiles.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@
/>
<!-- Avoid applying the newly generated AssemblyVersionInfo.cs file to the build
unless it has changed in order to allow for incremental building. -->
<Nerdbank.GitVersioning.Tasks.CompareFiles OriginalItems="$(VersionSourceFile)" NewItems="$(NewVersionSourceFile)">
<Output TaskParameter="AreChanged" PropertyName="AssemblyVersionInfoChanged" />
</Nerdbank.GitVersioning.Tasks.CompareFiles>
<Copy Condition=" '$(AssemblyVersionInfoChanged)' == 'true' " SourceFiles="$(NewVersionSourceFile)" DestinationFiles="$(VersionSourceFile)" />
<Copy SourceFiles="$(NewVersionSourceFile)" DestinationFiles="$(VersionSourceFile)" SkipUnchangedFiles="true" />
<ItemGroup>
<!-- prepend the source file so we don't break F# console apps that have a "special" last source file -->
<_CompileWithVersionFile Include="$(VersionSourceFile);@(Compile)" />
Expand Down Expand Up @@ -178,12 +175,7 @@
AssemblyCodepage="$(AssemblyCodepage)"
TargetFileName="$(TargetFileName)"
/>
<!-- Avoid applying the newly generated Version.rc file to the build
unless it has changed in order to allow for incremental building. -->
<Nerdbank.GitVersioning.Tasks.CompareFiles OriginalItems="$(VersionSourceFile)" NewItems="$(NewVersionSourceFile)">
<Output TaskParameter="AreChanged" PropertyName="_NativeVersionInfoChanged" />
</Nerdbank.GitVersioning.Tasks.CompareFiles>
<Copy Condition=" '$(_NativeVersionInfoChanged)' == 'true' " SourceFiles="$(NewVersionSourceFile)" DestinationFiles="$(VersionSourceFile)" />
<Copy SourceFiles="$(NewVersionSourceFile)" DestinationFiles="$(VersionSourceFile)" SkipUnchangedFiles="true" />
<ItemGroup>
<ResourceCompile Include="$(VersionSourceFile)" />
</ItemGroup>
Expand Down

0 comments on commit d1d0017

Please sign in to comment.