|
11 | 11 | <UsingTask AssemblyFile="$(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll" TaskName="WriteBuildOutputProps" />
|
12 | 12 | <UsingTask AssemblyFile="$(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll" TaskName="WriteRestoreSourceProps" />
|
13 | 13 | <UsingTask AssemblyFile="$(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll" TaskName="WriteVersionsFile" />
|
| 14 | + <UsingTask AssemblyFile="$(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll" TaskName="WriteFileInventory" /> |
14 | 15 |
|
15 | 16 | <!--
|
16 | 17 | Central property to define that a repo doesn't implement any of the Repo API. If a repo adds an
|
|
50 | 51 | <RepoApiArgs>$(RepoApiArgs) /p:DotNetOutputBlobFeedDir=$(SourceBuiltBlobFeedDir)</RepoApiArgs>
|
51 | 52 | </PropertyGroup>
|
52 | 53 |
|
| 54 | + <PropertyGroup Condition="'$(FileInventoryPath)'!=''" > |
| 55 | + <FileInventoryBeforePath>$(FileInventoryPath)$(RepositoryName)/before/</FileInventoryBeforePath> |
| 56 | + <FileInventoryAfterPath>$(FileInventoryPath)$(RepositoryName)/after/</FileInventoryAfterPath> |
| 57 | + </PropertyGroup> |
| 58 | + |
53 | 59 | <Import Project="$(ProjectDirectory)dependencies.props"
|
54 | 60 | Condition="'$(DependencyVersionInputRepoApiImplemented)' != 'true' AND
|
55 | 61 | Exists('$(ProjectDirectory)dependencies.props')" />
|
|
76 | 82 | WorkingDirectory="$(ProjectDirectory)" />
|
77 | 83 | </Target>
|
78 | 84 |
|
| 85 | + <Target Name="InventoryFilesBeforeBuild" |
| 86 | + BeforeTargets="Build"> |
| 87 | + |
| 88 | + <WriteFileInventory SourcePath="$(BaseOutputPath)" |
| 89 | + OutputPath="$(FileInventoryBeforePath)binInventory.txt" |
| 90 | + Condition="'$(FileInventoryBeforePath)'!=''" /> |
| 91 | + |
| 92 | + <WriteFileInventory SourcePath="$(NUGET_PACKAGES)" |
| 93 | + OutputPath="$(FileInventoryBeforePath)packageInventory.txt" |
| 94 | + Condition="'$(FileInventoryBeforePath)'!=''" /> |
| 95 | + |
| 96 | + <WriteFileInventory SourcePath="$(ProjectDirectory)" |
| 97 | + OutputPath="$(FileInventoryBeforePath)repoSourceInventory.txt" |
| 98 | + Condition="'$(FileInventoryBeforePath)'!=''" /> |
| 99 | + |
| 100 | + <Copy SourceFiles="$(VersionFileLocation)" |
| 101 | + DestinationFolder="$(FileInventoryBeforePath)" |
| 102 | + Condition="Exists('$(VersionFileLocation)')" /> |
| 103 | + |
| 104 | + <Copy SourceFiles="$(PackageVersionPropsPath)" |
| 105 | + DestinationFolder="$(FileInventoryBeforePath)" |
| 106 | + Condition="Exists('$(PackageVersionPropsPath)')" /> |
| 107 | + </Target> |
| 108 | + |
79 | 109 | <Target Name="UpdateNuGetConfig"
|
80 | 110 | BeforeTargets="Build"
|
81 | 111 | Condition="'$(NuGetConfigFile)' != ''">
|
|
173 | 203 | Condition="'@(_BuiltPackages)'!=''" />
|
174 | 204 | </Target>
|
175 | 205 |
|
| 206 | + <Target Name="InventoryFilesAfterBuild" |
| 207 | + AfterTargets="WriteVersions"> |
| 208 | + |
| 209 | + <WriteFileInventory SourcePath="$(BaseOutputPath)" |
| 210 | + OutputPath="$(FileInventoryAfterPath)binInventory.txt" |
| 211 | + Condition="'$(FileInventoryAfterPath)'!=''" /> |
| 212 | + |
| 213 | + <WriteFileInventory SourcePath="$(NUGET_PACKAGES)" |
| 214 | + OutputPath="$(FileInventoryAfterPath)packageInventory.txt" |
| 215 | + Condition="'$(FileInventoryAfterPath)'!=''" /> |
| 216 | + |
| 217 | + <WriteFileInventory SourcePath="$(ProjectDirectory)" |
| 218 | + OutputPath="$(FileInventoryAfterPath)repoSourceInventory.txt" |
| 219 | + Condition="'$(FileInventoryAfterPath)'!=''" /> |
| 220 | + |
| 221 | + <Copy SourceFiles="$(VersionFileLocation)" |
| 222 | + DestinationFolder="$(FileInventoryAfterPath)" |
| 223 | + Condition="Exists('$(VersionFileLocation)')" /> |
| 224 | + |
| 225 | + <Copy SourceFiles="$(PackageVersionPropsPath)" |
| 226 | + DestinationFolder="$(FileInventoryAfterPath)" |
| 227 | + Condition="Exists('$(PackageVersionPropsPath)')" /> |
| 228 | + </Target> |
| 229 | + |
176 | 230 | <Target Name="Clean" Condition="'$(CleanCommand)' != ''" >
|
177 | 231 | <Exec Command="$(CleanCommand) $(RedirectRepoOutputToLog)" WorkingDirectory="$(ProjectDirectory)" EnvironmentVariables="@(EnvironmentVariables)" />
|
178 | 232 | </Target>
|
|
0 commit comments