]> git.deb.at Git - rhonda/impostor.git/commitdiff
Added PublishTrimmed to Impostor.Server (#3)
authorGerard Smit <contact@gerard.pw>
Mon, 21 Sep 2020 21:43:02 +0000 (23:43 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Sep 2020 21:43:02 +0000 (23:43 +0200)
* Added PublishTrimmed to Impostor.Server
* Disabled trimming in CI
* Fixed Dockerfile for trimming

.github/workflows/main.yml
Dockerfile
src/Impostor.Server/Impostor.Server.csproj

index 7e668c4614f8b9eabdba1a76ac9aa87d6c0e96d2..36b89dc654a8e5ec654e1e0264bccba4a1357276 100644 (file)
@@ -32,7 +32,7 @@ jobs:
       - name: Build Impostor.Client
         run: msbuild ./src/Impostor.Client/Impostor.Client.csproj /p:Configuration=Release
       - name: Build Impostor.Server
-        run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Server/Impostor.Server.csproj
+        run: dotnet build --no-restore -c Release -f netcoreapp3.1 ./src/Impostor.Server/Impostor.Server.csproj -p:PublishTrimmed=false
       - name: Test
         run: dotnet test --no-restore -v normal -f netcoreapp3.1 ./src
   deploy:
index bca3c3e5b1397841ac25fd7d04ee2df19ef0ecc9..472694a078b9d54092d2298260635f2a09797a46 100644 (file)
@@ -13,10 +13,10 @@ RUN dotnet restore -r linux-musl-x64 ./src/Impostor.Server/Impostor.Server.cspro
 # Copy everything else.
 COPY submodules/. ./submodules/
 COPY src/. ./src/
-RUN dotnet publish -c release -o /app -f netcoreapp3.1 -r linux-musl-x64 --self-contained false --no-restore ./src/Impostor.Server/Impostor.Server.csproj
+RUN dotnet publish -c release -o /app -r linux-musl-x64 --no-restore ./src/Impostor.Server/Impostor.Server.csproj
 
 # Final image.
-FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
+FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine
 WORKDIR /app
 COPY --from=build /app ./
 EXPOSE 22023/udp
index 559e2f633c847f1844d00d82547b1e875ff01799..bed5d076ec36d1b8255d1af32be6139753613cf8 100644 (file)
@@ -4,6 +4,7 @@
         <OutputType>Exe</OutputType>
         <TargetFramework>netcoreapp3.1</TargetFramework>
         <RuntimeIdentifiers>win-x64;linux-x64;linux-musl-x64</RuntimeIdentifiers>
+        <PublishTrimmed>true</PublishTrimmed>
         <AssemblyTitle>Impostor.Server</AssemblyTitle>
         <Product>Impostor.Server</Product>
         <Copyright>Copyright © AeonLucid 2020</Copyright>