Skip to content

Commit

Permalink
Added trimmer instructions to prevent missing libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreas committed Dec 14, 2024
1 parent b8939a3 commit 311b885
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
echo "::set-output name=release_notes::$release_notes"
sed -i.bak "s/<TargetFramework>net6.0<\/TargetFramework>/<TargetFramework>${{ env.DOTNET_FRAMEWORK }}<\/TargetFramework>/g" ${{ env.PROJECT_PATH }}
sed -i.bak "s/<TargetFramework>net8.0<\/TargetFramework>/<TargetFramework>${{ env.DOTNET_FRAMEWORK }}<\/TargetFramework>/g" ${{ env.PROJECT_PATH }}
if [ "${{ matrix.target }}" == "osx-arm64" ]; then
dotnet publish ${{ env.PROJECT_PATH }} --framework ${{ env.DOTNET_FRAMEWORK }} --runtime "${{ matrix.target }}" -c Release -p:EnableCompressionInSingleFile=false -p:PublishSingleFile=true --self-contained true -p:PublishReadyToRun=true -p:PublishTrimmed=true -o "$release_name"
Expand Down
6 changes: 6 additions & 0 deletions tone/tone.TrimmerRootDescriptor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<linker>
<!--<assembly fullname="Spectre.Console" preserve="all" /> this seems to be optional-->
<assembly fullname="Spectre.Console.Cli" preserve="all" /><!-- this is a must -->
<assembly fullname="tone" preserve="all" />
</linker>
4 changes: 4 additions & 0 deletions tone/tone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,8 @@
<None Remove="doc\release\vortex_before.txt" />
</ItemGroup>

<ItemGroup>
<TrimmerRootDescriptor Include="tone.TrimmerRootDescriptor.xml" />
</ItemGroup>

</Project>

0 comments on commit 311b885

Please sign in to comment.