|
1 |
| -<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Restore;Build"> |
| 1 | +<Project> |
| 2 | + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" /> |
2 | 3 |
|
3 | 4 | <PropertyGroup>
|
4 | 5 | <TargetFramework>netstandard2.0</TargetFramework>
|
|
35 | 36 | <!-- DownloadFilesFromUrl requires Url metadata is set and ignores the identity of the item -->
|
36 | 37 | <_downloadFiles Include="@(TensorFlowArchive)" Url="%(Identity)" DestinationFile="%(DownloadFile)" />
|
37 | 38 | </ItemGroup>
|
38 |
| - <DownloadFilesFromUrl Items="@(_downloadFiles)"> |
39 |
| - <Output TaskParameter="FilesCreated" ItemName="FileWrites" /> |
40 |
| - </DownloadFilesFromUrl> |
| 39 | + <DownloadFilesFromUrl Items="@(_downloadFiles)" /> |
41 | 40 | </Target>
|
42 | 41 |
|
43 | 42 | <UsingTask TaskName="GenerateChecksums" AssemblyFile="$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll"/>
|
|
51 | 50 | <_filesToCheckSum Include="@(TensorFlowArchive->'%(DownloadFile)')" DestinationPath="%(DownloadShaFile)" />
|
52 | 51 | </ItemGroup>
|
53 | 52 | <GenerateChecksums Items="@(_filesToCheckSum)" />
|
54 |
| - <ItemGroup> |
55 |
| - <FileWrites Include="@(TensorFlowArchive->'%(DownloadShaFile)')" /> |
56 |
| - </ItemGroup> |
57 | 53 |
|
58 | 54 | <!-- If specified we'll update the checked in SHAs with the downloaded ones. -->
|
59 | 55 | <Copy Condition="'$(UpdateSHA)' == 'true'"
|
|
75 | 71 | <!-- The archives are valid, lets extract them, ensuring an empty directory -->
|
76 | 72 | <RemoveDir Directories="@(TensorFlowArchive->'%(ExtractDirectory)')" />
|
77 | 73 | <MakeDir Directories="@(TensorFlowArchive->'%(ExtractDirectory)')" />
|
78 |
| - <ZipFileExtractToDirectory Condition="'%(FileExtension)' == '.zip'" |
| 74 | + <ZipFileExtractToDirectory Condition="'%(TensorFlowArchive.FileExtension)' == '.zip'" |
79 | 75 | SourceArchive="%(TensorFlowArchive.DownloadFile)"
|
80 | 76 | DestinationDirectory="%(TensorFlowArchive.ExtractDirectory)"
|
81 | 77 | OverwriteDestination="true" />
|
82 |
| - <Exec Condition="'%(FileExtension)' == '.tar.gz'" |
| 78 | + <Exec Condition="'%(TensorFlowArchive.FileExtension)' == '.tar.gz'" |
83 | 79 | Command="tar -xzmf "%(TensorFlowArchive.DownloadFile)" -C "%(TensorFlowArchive.ExtractDirectory)"" />
|
84 | 80 | <Touch Files="@(TensorFlowArchive->'%(ExtractSemaphore)')" AlwaysCreate="true" />
|
85 |
| - |
86 |
| - <ItemGroup> |
87 |
| - <FileWrites Include="%(TensorFlowArchive.ExtractDirectory)\**\*" /> |
88 |
| - </ItemGroup> |
89 |
| - </Target> |
90 |
| - |
91 |
| - <!-- Clean up empty directories left behind by clean, since it otherwise would not do this --> |
92 |
| - <Target Name="CleanExtractDirectories" |
93 |
| - BeforeTargets="AfterClean" |
94 |
| - DependsOnTargets="PrepareArchives"> |
95 |
| - <RemoveDir Directories="@(TensorFlowArchive->'%(ExtractDirectory)')" /> |
96 | 81 | </Target>
|
97 | 82 |
|
98 | 83 | <!-- Select the files we want to copy out of each archive. -->
|
|
119 | 104 | <Target Name="CopyFilesFromArchive"
|
120 | 105 | DependsOnTargets="GetFilesFromArchive">
|
121 | 106 | <Copy SourceFiles="@(FilesFromArchive)"
|
122 |
| - DestinationFiles="@(FilesFromArchive->'%(TargetPath)')"> |
123 |
| - <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
124 |
| - </Copy> |
| 107 | + DestinationFiles="@(FilesFromArchive->'%(TargetPath)')" /> |
125 | 108 | </Target>
|
126 | 109 |
|
127 |
| - <!-- Define CoreCompile to do the work of downloading and copying assets --> |
128 |
| - <Target Name="CoreCompile" |
| 110 | + <!-- Define Build to do the work of downloading and copying assets --> |
| 111 | + <Target Name="Build" |
129 | 112 | DependsOnTargets="CopyFilesFromArchive" />
|
130 | 113 |
|
131 |
| - <!-- required by common targets --> |
132 |
| - <Target Name="CreateManifestResourceNames" /> |
| 114 | + <Target Name="Clean"> |
| 115 | + <RemoveDir Directories="$(IntermediateOutputPath)" /> |
| 116 | + </Target> |
133 | 117 | </Project>
|
0 commit comments