Skip to content

Commit

Permalink
Use .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Nov 12, 2024
1 parent 7b892c8 commit 0fa5e93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Verify formatting
run: >
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Run tests
env:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Publish app
run: >
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Version>999.9.9-dev</Version>
<Company>Tyrrrz</Company>
<Copyright>Copyright (c) Oleksii Holub</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions DiscordChatExporter.Cli.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -- Build
# Specify the platform here so that we pull the SDK image matching the host platform,
# instead of the target platform specified during build by the `--platform` option.
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build

# Expose the target architecture set by the `docker build --platform` option, so that
# we can build the assembly for the correct platform.
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN dotnet publish DiscordChatExporter.Cli \

# -- Run
# Use `runtime-deps` instead of `runtime` because we have a self-contained assembly
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS run
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:9.0-alpine AS run

LABEL org.opencontainers.image.title="DiscordChatExporter.Cli"
LABEL org.opencontainers.image.description="DiscordChatExporter is an application that can be used to export message history from any Discord channel to a file."
Expand Down
7 changes: 3 additions & 4 deletions DiscordChatExporter.Core/Markdown/Parsing/AggregateMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
namespace DiscordChatExporter.Core.Markdown.Parsing;

internal class AggregateMatcher<TContext, TValue>(
IReadOnlyList<IMatcher<TContext, TValue>> matchers
params IReadOnlyList<IMatcher<TContext, TValue>> matchers
) : IMatcher<TContext, TValue>
{
public AggregateMatcher(params IMatcher<TContext, TValue>[] matchers)
: this((IReadOnlyList<IMatcher<TContext, TValue>>)matchers) { }

public ParsedMatch<TValue>? TryMatch(TContext context, StringSegment segment)
{
ParsedMatch<TValue>? earliestMatch = null;
Expand All @@ -28,7 +25,9 @@ public AggregateMatcher(params IMatcher<TContext, TValue>[] matchers)
earliestMatch is null
|| match.Segment.StartIndex < earliestMatch.Segment.StartIndex
)
{
earliestMatch = match;
}

// If the earliest match starts at the very beginning - break,
// because it's impossible to find a match earlier than that
Expand Down

0 comments on commit 0fa5e93

Please sign in to comment.