Skip to content

Commit

Permalink
Fix self-contained not being self-contained
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikwidlund committed Jan 18, 2025
1 parent 2c77749 commit f1a2727
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
target="${{ matrix.target }}-$target_arch"
release_name="HostsParser-$tag-$target"
if [ "$target_arch" == "arm64" ]; then
dotnet publish "./src/HostsParser/HostsParser.csproj" -r $target -c Release -o release -p:Version="$ASSEMBLY_VERSION" --self-contained
dotnet publish "./src/HostsParser/HostsParser.csproj" -r $target -c Release -o release -p:Version="$ASSEMBLY_VERSION"
else
dotnet publish "./src/HostsParser/HostsParser.csproj" -r $target -c Release -o release -p:Version="$ASSEMBLY_VERSION" -p:PublishAot=true
fi
Expand Down
12 changes: 12 additions & 0 deletions src/HostsParser/HostsParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@
<Copyright>Henrik Widlund</Copyright>
<License>GPL-3.0 License</License>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishUsingAot)' == 'true'">
<PublishAot>true</PublishAot>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishUsingAot)' != 'true'">
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.1" />
Expand Down

0 comments on commit f1a2727

Please sign in to comment.