mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
upgrade to net10.0
This commit is contained in:
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@@ -54,9 +54,7 @@ jobs:
|
||||
- name: Update dotnet
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
12
.github/workflows/dotnet.yml
vendored
12
.github/workflows/dotnet.yml
vendored
@@ -15,9 +15,7 @@ jobs:
|
||||
- name: update dotnet core sdk
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
dotnet-version: 10.0.x
|
||||
- name: dotnet restore (first try)
|
||||
run: dotnet restore --ignore-failed-sources
|
||||
- name: dotnet restore (second try)
|
||||
@@ -37,9 +35,7 @@ jobs:
|
||||
- name: update dotnet core sdk
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
dotnet-version: 10.0.x
|
||||
- name: dotnet restore (first try)
|
||||
run: dotnet restore --ignore-failed-sources
|
||||
- name: dotnet restore (second try)
|
||||
@@ -74,9 +70,7 @@ jobs:
|
||||
- name: update dotnet core sdk
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
dotnet-version: 10.0.x
|
||||
- name: dotnet restore (first try)
|
||||
run: dotnet restore --ignore-failed-sources
|
||||
- name: dotnet restore (second try)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<EmitCompilerGeneratedFiles>false</EmitCompilerGeneratedFiles>
|
||||
<LangVersion>latest</LangVersion>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -328,7 +328,7 @@ public partial class Client
|
||||
.ToList();
|
||||
return await builds
|
||||
.ToAsyncEnumerable()
|
||||
.SelectAwait(async b => await GetArtifactsInfoAsync(b.HeadSha, b, cancellationToken).ConfigureAwait(false))
|
||||
.Select((b, ct) => GetArtifactsInfoAsync(b.HeadSha, b, ct))
|
||||
.ToListAsync(cancellationToken: cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
@@ -8,7 +8,6 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.1" />
|
||||
<PackageReference Include="Octokit" Version="14.0.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.42.1" />
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CompatApiClient\CompatApiClient.csproj" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CompatBot.Database.Providers;
|
||||
using CompatBot.Database;
|
||||
using CompatBot.Database.Providers;
|
||||
|
||||
namespace CompatBot.Commands;
|
||||
|
||||
@@ -80,7 +81,7 @@ internal static partial class Sudo
|
||||
var modList = ModProvider.Mods
|
||||
.Values
|
||||
.ToAsyncEnumerable()
|
||||
.SelectAwait(async m =>(m: m, u: await ctx.Client.GetUserAsync(m.DiscordId).ConfigureAwait(false)))
|
||||
.Select(async (Moderator m, CancellationToken _) => (m: m, u: await ctx.Client.GetUserAsync(m.DiscordId).ConfigureAwait(false)))
|
||||
.OrderByDescending(i => i.m.Sudoer)
|
||||
.ThenBy(i => i.u.Username)
|
||||
.ToList();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<TieredCompilation>true</TieredCompilation>
|
||||
<RootNamespace>CompatBot</RootNamespace>
|
||||
<UserSecretsId>c2e6548b-b215-4a18-a010-958ef294b310</UserSecretsId>
|
||||
@@ -55,12 +55,12 @@
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.23.0" />
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.23.0" />
|
||||
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.11">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.1" />
|
||||
@@ -75,7 +75,6 @@
|
||||
<PackageReference Include="Result.Net" Version="1.7.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.42.1" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.3" />
|
||||
<PackageReference Include="TesseractCSharp" Version="1.0.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -146,6 +146,7 @@ public static partial class DiscLanguageProvider
|
||||
["Italy"] = "🇮🇹",
|
||||
["Japan"] = "🇯🇵",
|
||||
["Korea"] = "🇰🇷",
|
||||
["Latin America"] = "🇱🇽", // not a real code
|
||||
["Mexico"] = "🇲🇽",
|
||||
["New Zealand"] = "🇳🇿",
|
||||
["Poland"] = "🇵🇱",
|
||||
|
||||
@@ -84,7 +84,7 @@ public static class LogParsingHandler
|
||||
DiscordMessage? botMsg = null;
|
||||
var possibleHandlers = SourceHandlers
|
||||
.ToAsyncEnumerable()
|
||||
.SelectAwait(async h => await h.FindHandlerAsync(message, ArchiveHandlers).ConfigureAwait(false))
|
||||
.Select(async (ISourceHandler h, CancellationToken _) => await h.FindHandlerAsync(message, ArchiveHandlers).ConfigureAwait(false))
|
||||
.ToList();
|
||||
using var source = possibleHandlers.FirstOrDefault(h => h.IsSuccess())?.Data;
|
||||
var fail = possibleHandlers.FirstOrDefault(h => h is {Message.Length: >0})?.Message;
|
||||
|
||||
@@ -328,7 +328,7 @@ internal sealed partial class PsnScraper
|
||||
.Select(sku => sku.Id)
|
||||
.Distinct()
|
||||
.ToAsyncEnumerable()
|
||||
.WhereAwait(async id => ProductCodeLookup.Pattern().IsMatch(id)
|
||||
.Where(async (id, _) => ProductCodeLookup.Pattern().IsMatch(id)
|
||||
&& await NeedLookupAsync(id).ConfigureAwait(false)
|
||||
).ToList();
|
||||
foreach (var relatedSku in relatedSkus)
|
||||
|
||||
@@ -124,7 +124,7 @@ internal static class AzureDevOpsClientExtensions
|
||||
.ToList();
|
||||
return await builds
|
||||
.ToAsyncEnumerable()
|
||||
.SelectAwait(async b => await azureDevOpsClient.GetArtifactsInfoAsync(b.SourceVersion, b, cancellationToken).ConfigureAwait(false))
|
||||
.Select((b, ct) => azureDevOpsClient.GetArtifactsInfoAsync(b.SourceVersion, b, ct))
|
||||
.ToListAsync(cancellationToken: cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-noble AS base
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS base
|
||||
|
||||
# Native libgdiplus dependencies
|
||||
RUN apt-get update
|
||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev fonts-roboto tzdata libarchive13t64 liblept5
|
||||
RUN wget https://archive.ubuntu.com/ubuntu/pool/main/t/tiff/libtiff5_4.3.0-6_amd64.deb
|
||||
RUN dpkg -i ./libtiff5_4.3.0-6_amd64.deb
|
||||
RUN rm ./libtiff5_4.3.0-6_amd64.deb
|
||||
RUN wget https://archive.ubuntu.com/ubuntu/pool/main/t/tiff/libtiff5_4.3.0-6ubuntu0.12_amd64.deb
|
||||
RUN dpkg -i ./libtiff5_4.3.0-6ubuntu0.12_amd64.deb
|
||||
RUN rm ./libtiff5_4.3.0-6ubuntu0.12_amd64.deb
|
||||
|
||||
# Regular stuff
|
||||
#COPY packages /root/.nuget/packages/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<EmitCompilerGeneratedFiles>false</EmitCompilerGeneratedFiles>
|
||||
|
||||
@@ -9,7 +9,7 @@ You can read the design and implementation notes by visiting the folders in the
|
||||
|
||||
Development Requirements
|
||||
------------------------
|
||||
* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) or newer
|
||||
* [.NET 10.0 SDK](https://dotnet.microsoft.com/download) or newer
|
||||
* Any text editor, but here are some recommends:
|
||||
* [Visual Studio](https://visualstudio.microsoft.com/) (Windows, has free Community edition)
|
||||
* [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free)
|
||||
@@ -17,7 +17,7 @@ Development Requirements
|
||||
|
||||
Runtime Requirements
|
||||
--------------------
|
||||
* [.NET 9.0 SDK](https://dotnet.microsoft.com/download) or newer to run from sources
|
||||
* [.NET 10.0 SDK](https://dotnet.microsoft.com/download) or newer to run from sources
|
||||
* Bot needs `dotnet` command to be available (i.e. alias for the Snap package)
|
||||
* OCR on Linux requires the following dependencies to be installed: `libarchive.so.13`, `liblept.so.5`, `libtiff.so.5`
|
||||
* On Ubuntu 24.04 this is provided by the following packages:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
Reference in New Issue
Block a user