Update build script

This commit is contained in:
cxfksword 2022-10-27 10:27:43 +08:00
parent 2d1341f30b
commit c109ba4c35
4 changed files with 14 additions and 16 deletions

View File

@ -34,6 +34,8 @@ jobs:
run: dotnet restore ${{ env.project }} --no-cache
- name: Build
run: dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 --output=artifacts -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
- name: Clean publish dll
run: cd artifacts && rm -rf MediaBrowser*.dll Microsoft*.dll Newtonsoft*.dll System*.dll Emby*.dll Jellyfin.Data*.dll Jellyfin.Extensions*.dll *.json *.pdb
- name: Compress build files
uses: thedoctor0/zip-release@main
with:

View File

@ -14,12 +14,12 @@
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Jellyfin.Controller" Version="10.8.0" />
<PackageReference Include="Jellyfin.Model" Version="10.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jellyfin.Plugin.MetaShark\Jellyfin.Plugin.MetaShark.csproj" />
<ProjectReference Include="..\Jellyfin.Plugin.MetaShark\Jellyfin.Plugin.MetaShark.csproj" >
<ExcludeAssets></ExcludeAssets>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -8,7 +8,6 @@
<Nullable>enable</Nullable>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -22,15 +21,8 @@
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="AnitomySharp" Version="0.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Jellyfin.Controller" Version="10.8.0">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Jellyfin.Model" Version="10.8.0">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Jellyfin.Controller" Version="10.8.0" />
<PackageReference Include="Jellyfin.Model" Version="10.8.0" />
</ItemGroup>
<ItemGroup>

View File

@ -37,8 +37,12 @@ jellyfin电影元数据插件影片信息只要从豆瓣获取并由TheMov
3. Build plugin with following command.
```sh
$ dotnet restore
$ dotnet publish Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
dotnet restore
dotnet publish --output=artifacts Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
# remove unused dll
cd artifacts
rm -rf MediaBrowser*.dll Microsoft*.dll Newtonsoft*.dll System*.dll Emby*.dll Jellyfin.Data*.dll Jellyfin.Extensions*.dll *.json *.pdb
```
@ -46,7 +50,7 @@ $ dotnet publish Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
1. Build the plugin
2. Create a folder, like `metashark` and copy `bin/Debug/net6.0/*.dll` into it
2. Create a folder, like `metashark` and copy `artifacts/*.dll` into it
3. Move folder `metashark` to jellyfin `data/plugin` folder