chore: put embedded resources item group in target where models are downloaded

This commit is contained in:
Stevan Freeborn
2025-02-14 00:12:54 -06:00
parent 037b888280
commit 3073a4038e
2 changed files with 12 additions and 14 deletions
+1 -3
View File
@@ -63,9 +63,7 @@ jobs:
- name: Restore dependencies
run: dotnet restore src
- name: Build on ${{ matrix.os }}
run: dotnet build src --no-restore
- name: List downloaded models
run: ls -l src/BGR.Console/Resources/Files
run: dotnet build --no-restore src
- name: Test on ${{ matrix.os }}
run: dotnet test src --no-build --verbosity normal
- name: Rename test coverage report
+11 -11
View File
@@ -13,7 +13,7 @@
</PropertyGroup>
<PropertyGroup>
<DownloadDirectory>Resources\Files</DownloadDirectory>
<DownloadDirectory>Resources/Files</DownloadDirectory>
</PropertyGroup>
<Target Name="DownloadModels" BeforeTargets="PrepareForBuild">
@@ -22,19 +22,23 @@
<MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" />
<Exec
Condition="!Exists('$(DownloadDirectory)\rmbg.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)\rmbg.onnx&quot;"
Condition="!Exists('$(DownloadDirectory)/rmbg.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)/rmbg.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)\u2net.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)\u2net.onnx&quot;"
Condition="!Exists('$(DownloadDirectory)/u2net.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)/u2net.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)\modnet.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/modnet.onnx&quot; -o &quot;$(DownloadDirectory)\modnet.onnx&quot;"
Condition="!Exists('$(DownloadDirectory)/modnet.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/modnet.onnx&quot; -o &quot;$(DownloadDirectory)/modnet.onnx&quot;"
/>
<ItemGroup>
<EmbeddedResource Include="Resources\Files\**\*" />
</ItemGroup>
</Target>
<ItemGroup>
@@ -56,8 +60,4 @@
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Files\**\*" />
</ItemGroup>
</Project>