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 - name: Restore dependencies
run: dotnet restore src run: dotnet restore src
- name: Build on ${{ matrix.os }} - name: Build on ${{ matrix.os }}
run: dotnet build src --no-restore run: dotnet build --no-restore src
- name: List downloaded models
run: ls -l src/BGR.Console/Resources/Files
- name: Test on ${{ matrix.os }} - name: Test on ${{ matrix.os }}
run: dotnet test src --no-build --verbosity normal run: dotnet test src --no-build --verbosity normal
- name: Rename test coverage report - name: Rename test coverage report
+11 -11
View File
@@ -13,7 +13,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<DownloadDirectory>Resources\Files</DownloadDirectory> <DownloadDirectory>Resources/Files</DownloadDirectory>
</PropertyGroup> </PropertyGroup>
<Target Name="DownloadModels" BeforeTargets="PrepareForBuild"> <Target Name="DownloadModels" BeforeTargets="PrepareForBuild">
@@ -22,19 +22,23 @@
<MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" /> <MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" />
<Exec <Exec
Condition="!Exists('$(DownloadDirectory)\rmbg.onnx')" Condition="!Exists('$(DownloadDirectory)/rmbg.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)\rmbg.onnx&quot;" Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)/rmbg.onnx&quot;"
/> />
<Exec <Exec
Condition="!Exists('$(DownloadDirectory)\u2net.onnx')" Condition="!Exists('$(DownloadDirectory)/u2net.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)\u2net.onnx&quot;" Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)/u2net.onnx&quot;"
/> />
<Exec <Exec
Condition="!Exists('$(DownloadDirectory)\modnet.onnx')" Condition="!Exists('$(DownloadDirectory)/modnet.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/modnet.onnx&quot; -o &quot;$(DownloadDirectory)\modnet.onnx&quot;" 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> </Target>
<ItemGroup> <ItemGroup>
@@ -56,8 +60,4 @@
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" /> <PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Files\**\*" />
</ItemGroup>
</Project> </Project>