Skip to content

Commit

Permalink
Retarget dotnet 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gitfool committed Aug 13, 2023
1 parent 95e7e3d commit 563613f
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 158 deletions.
5 changes: 3 additions & 2 deletions Cli/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*
!bin/Release/linux-x64/publish/
**/config/_development.yaml
!bin/Release/publish/
**/_development.yaml
**/*.exe
6 changes: 3 additions & 3 deletions Cli/Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AssemblyName>bgg-dungeon</AssemblyName>
<PublishOnBuild>true</PublishOnBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
Expand All @@ -20,7 +20,7 @@
<PublishTrimmed>true</PublishTrimmed>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<TrimMode>copyused</TrimMode>
</PropertyGroup>
</PropertyGroup> -->

<ItemGroup>
<ProjectReference Include="..\Library\Library.csproj" />
Expand Down
20 changes: 5 additions & 15 deletions Cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0.5-jammy
FROM mcr.microsoft.com/dotnet/runtime:7.0.10-jammy

LABEL org.opencontainers.image.source=https://github.com/gitfool/BoardGameGeek.Dungeon

Expand All @@ -11,16 +11,6 @@ RUN <<EOF
rm -rf /var/lib/apt/lists/*
EOF

# Install libssl 1.1; workaround dotnet 5.0 runtime dependency removed from ubuntu jammy
# renovate: datasource=repology depName=libssl1.1 packageName=ubuntu_20_04/openssl versioning=loose
RUN <<EOF
set -ex
version=1.1.1f-1ubuntu2.19
curl -fsSL https://launchpad.net/ubuntu/+archive/primary/+files/libssl1.1_${version}_amd64.deb -o libssl1.1.deb
DEBIAN_FRONTEND=noninteractive dpkg -i libssl1.1.deb
rm -f libssl1.1.deb
EOF

# Add non-root user
RUN <<EOF
set -ex
Expand All @@ -44,12 +34,12 @@ ENV DOTNET_HostBuilder__ReloadConfigOnChange=false

WORKDIR /home/user/dungeon

COPY --link --chown=1000:1000 bin/Release/linux-x64/publish .
COPY --link --chown=1000:1000 bin/Release/publish .

RUN <<EOF
set -ex
echo "alias d='cd ~/dungeon && ./bgg-dungeon'" >> ~/.bash_aliases
chmod -x config/*.yaml
echo "alias d='cd ~/dungeon && dotnet bgg-dungeon.dll'" >> ~/.bash_aliases
find . -type f -regextype posix-egrep -iregex '.*\.(dll|json|yaml)$' -exec chmod -x {} \;
EOF

ENTRYPOINT [ "./bgg-dungeon" ]
ENTRYPOINT [ "dotnet", "bgg-dungeon.dll" ]
93 changes: 32 additions & 61 deletions Cli/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
".NETCoreApp,Version=v5.0": {
"net7.0": {
"Flurl": {
"type": "Direct",
"requested": "[3.0.7, )",
Expand Down Expand Up @@ -175,8 +175,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "3aeMZ1N0lJoSyzqiP03hqemtb1BijhsJADdobn/4nsMJ8V1H+CrpuduUe4hlRdx+ikBQju1VGjMD1GJ3Sk05Eg=="
"resolved": "6.0.0",
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
Expand Down Expand Up @@ -279,8 +279,6 @@
"resolved": "7.0.0",
"contentHash": "oONNYd71J3LzkWc4fUHl3SvMfiQMYUCo/mDHDEu76hYYxdhdrPYv6fvGv9nnKVyhE9P0h20AU8RZB5OOWQcAXg==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5",
"System.Text.Encodings.Web": "7.0.0",
"System.Text.Json": "7.0.0"
}
Expand Down Expand Up @@ -326,18 +324,13 @@
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Diagnostics.DiagnosticSource": "7.0.0"
"Microsoft.Extensions.Options": "7.0.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5"
}
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
},
"Microsoft.Extensions.Logging.Configuration": {
"type": "Transitive",
Expand All @@ -359,13 +352,11 @@
"resolved": "7.0.0",
"contentHash": "qt5n8bHLZPUfuRnFxJKW5q9ZwOTncdh96rtWzWpX3Y/064MlxzCSw2ELF5Jlwdo+Y4wK3I47NmUTFsV7Sg8rqg==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Configuration": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Buffers": "4.5.1",
"System.Text.Json": "7.0.0"
}
},
Expand Down Expand Up @@ -396,14 +387,11 @@
"resolved": "7.0.0",
"contentHash": "MxQXndQFviIyOPqyMeLNshXnmqcfzEHE2wWcr7BF1unSisJgouZ3tItnq+aJLGPojrW8OZSC/ZdRoR6wAq+c7w==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Json": "7.0.0"
}
},
Expand All @@ -422,11 +410,7 @@
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
Expand Down Expand Up @@ -652,8 +636,15 @@
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
"resolved": "4.3.0",
"contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==",
"dependencies": {
"System.Diagnostics.Debug": "4.3.0",
"System.Diagnostics.Tracing": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Threading": "4.3.0"
}
},
"System.Collections": {
"type": "Transitive",
Expand Down Expand Up @@ -707,19 +698,12 @@
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.1",
"contentHash": "T9SLFxzDp0SreCffRDXSAS5G+lq6E8qP4knHS2IBjwCdx2KEvGnGZsq7gFpselYOda7l6gXsJMD93TQsFj/URA==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"contentHash": "T9SLFxzDp0SreCffRDXSAS5G+lq6E8qP4knHS2IBjwCdx2KEvGnGZsq7gFpselYOda7l6gXsJMD93TQsFj/URA=="
},
"System.Diagnostics.EventLog": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "eUDP47obqQm3SFJfP6z+Fx2nJ4KKTQbXB4Q9Uesnzw9SbYdhjyoGXuvDn/gEmFY6N5Z3bFFbpAQGA7m6hrYJCw==",
"dependencies": {
"System.Security.Principal.Windows": "5.0.0"
}
"contentHash": "eUDP47obqQm3SFJfP6z+Fx2nJ4KKTQbXB4Q9Uesnzw9SbYdhjyoGXuvDn/gEmFY6N5Z3bFFbpAQGA7m6hrYJCw=="
},
"System.Diagnostics.Tools": {
"type": "Transitive",
Expand Down Expand Up @@ -863,7 +847,10 @@
"System.Linq.Async": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "0YhHcaroWpQ9UCot3Pizah7ryAzQhNvobLMSxeDIGmnXfkQn8u5owvpOH0K6EVB+z9L7u6Cc4W17Br/+jyttEQ=="
"contentHash": "0YhHcaroWpQ9UCot3Pizah7ryAzQhNvobLMSxeDIGmnXfkQn8u5owvpOH0K6EVB+z9L7u6Cc4W17Br/+jyttEQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"System.Linq.Expressions": {
"type": "Transitive",
Expand Down Expand Up @@ -951,11 +938,6 @@
"System.Threading.Tasks": "4.3.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.ObjectModel": {
"type": "Transitive",
"resolved": "4.3.0",
Expand Down Expand Up @@ -1066,8 +1048,8 @@
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
"resolved": "4.5.2",
"contentHash": "wprSFgext8cwqymChhrBLu62LMg/1u92bU+VOwyfBimSPVFXtsNqEWC92Pf9ofzJFlk4IHmJA75EDJn1b2goAQ=="
},
"System.Runtime.Extensions": {
"type": "Transitive",
Expand Down Expand Up @@ -1271,11 +1253,6 @@
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
}
},
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
},
"System.Text.Encoding": {
"type": "Transitive",
"resolved": "4.3.0",
Expand Down Expand Up @@ -1309,25 +1286,14 @@
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
"contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "DaGSsVqKsn/ia6RG8frjwmJonfos0srquhw09TlT8KRw5I43E+4gs+/bZj4K0vShJ5H9imCuXupb4RmS+dBy3w==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Text.Encodings.Web": "7.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
"System.Text.Encodings.Web": "7.0.0"
}
},
"System.Text.RegularExpressions": {
Expand Down Expand Up @@ -1359,8 +1325,13 @@
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg=="
"resolved": "4.3.0",
"contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==",
"dependencies": {
"System.Collections": "4.3.0",
"System.Runtime": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Threading.Timer": {
"type": "Transitive",
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<PackageTags>BoardGameGeek;BGG;Tools</PackageTags>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- <CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages> -->
<DebugType>embedded</DebugType>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<LangVersion>preview</LangVersion>
<NoWarn>MSB3270;NU5105</NoWarn>
<Nullable>enable</Nullable>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
Expand Down
12 changes: 0 additions & 12 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
<Project>
<!-- https://github.com/dotnet/sdk/issues/1458#issuecomment-420456386 -->
<Target Name="_ResolveCopyLocalNuGetPackagePdbsAndXml" Condition="$(CopyLocalLockFileAssemblies) == true" AfterTargets="ResolveReferences">
<ItemGroup>
<ReferenceCopyLocalPaths
Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')"
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
<!-- <ReferenceCopyLocalPaths
Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')"
Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')" /> -->
</ItemGroup>
</Target>

<Target Name="PublishOnBuild" Condition="'$(PublishOnBuild)' == 'true'" AfterTargets="Build" DependsOnTargets="Publish" />
</Project>
2 changes: 1 addition & 1 deletion Library/Library.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Library/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
".NETCoreApp,Version=v5.0": {
"net7.0": {
"FluentValidation": {
"type": "Direct",
"requested": "[11.5.2, )",
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
Expand Down
Loading

0 comments on commit 563613f

Please sign in to comment.