Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
Expand Down
65 changes: 0 additions & 65 deletions Nellebot.sln

This file was deleted.

14 changes: 14 additions & 0 deletions Nellebot.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/Nellebot.Common/Nellebot.Common.csproj" />
<Project Path="src/Nellebot.Data.Migrations/Nellebot.Data.Migrations.csproj" />
<Project Path="src/Nellebot.Data/Nellebot.Data.csproj" />
<Project Path="src/Nellebot/Nellebot.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Nellebot.Tests/Nellebot.Tests.csproj" />
</Folder>
<Project Path="docker/docker.dcproj" Type="C#">
<BuildType Project="Debug" />
</Project>
</Solution>
10 changes: 5 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Source code for the discord bot Reifnir, made for the Norwegian-English Language

### Requirements

- [.NET 8 SDK](https://dotnet.microsoft.com/download/visual-studio-sdks)
- [.NET 10 SDK](https://dotnet.microsoft.com/download/visual-studio-sdks)
- [Visual Studio](https://visualstudio.microsoft.com/) (or any other preferred editor + dotnet command line tool)
- [PostgreSQL 15+](https://www.postgresql.org/)

Expand All @@ -18,8 +18,8 @@ Source code for the discord bot Reifnir, made for the Norwegian-English Language
Configure the bot token and connection string in user secrets:

```
"Nellebot:BotToken": "TOKEN_GOES_HERE"
"Nellebot:ConnectionString": "CONN_STRING_GOES_HERE"
"Nellebot:BotToken": "TOKEN_GOES_HERE"
"Nellebot:ConnectionString": "CONN_STRING_GOES_HERE"
```

or as environment variables:
Expand Down Expand Up @@ -57,9 +57,9 @@ Optionally, use `Compose \W PgAdmin` profile to include a PgAdmin container.

#### Nellebot project only

`docker build -t kattbot -f docker/Dockerfile .`
`docker build -t nellebot -f docker/Dockerfile .`

`docker run -d --name kattbot kattbot`
`docker run -d --name nellebot nellebot`

#### Nellebot and PostgreSQL

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.304",
"version": "10.0.103",
"rollForward": "latestMinor"
}
}
4 changes: 0 additions & 4 deletions src/Nellebot.Common/Nellebot.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
Expand Down
15 changes: 7 additions & 8 deletions src/Nellebot.Data.Migrations/Nellebot.Data.Migrations.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>7a62f6ea-02a2-4b44-b57f-714850c14b99</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.10">
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 2 additions & 6 deletions src/Nellebot.Data/Nellebot.Data.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="9.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="10.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
6 changes: 3 additions & 3 deletions src/Nellebot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/runtime:9.0 AS base
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS base
RUN mkdir /keydata && \
chown $APP_UID:$APP_UID /keydata

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Debug
RUN mkdir /keydata && \
chown $APP_UID:$APP_UID /keydata
Expand All @@ -12,7 +12,7 @@ COPY ["src/Nellebot/Nellebot.csproj", "Nellebot/"]
COPY ["src/Nellebot.Common/Nellebot.Common.csproj", "Nellebot.Common/"]
COPY ["src/Nellebot.Data/Nellebot.Data.csproj", "Nellebot.Data/"]
RUN dotnet restore "./Nellebot/Nellebot.csproj"
COPY ["Nellebot.sln", "."]
COPY ["Nellebot.slnx", "."]
COPY ["stylecop.json", "."]
COPY [".editorconfig", "."]
COPY src .
Expand Down
23 changes: 11 additions & 12 deletions src/Nellebot/Nellebot.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>dotnet-Nellebot-A35E98EA-550A-4966-AD77-530BC4395F56</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
Expand All @@ -15,20 +14,20 @@
<Version>1.2.3-a.4</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02556" />
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02556" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02556" />
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.10" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02572" />
<PackageReference Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02572" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02572" />
<PackageReference Include="MediatR" Version="[12.5.0,13)" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Abstractions" Version="10.0.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.0" />
<PackageReference Include="Quartz" Version="3.15.1" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.15.1" />
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.15.1" />
<PackageReference Include="Scriban" Version="6.5.0" />
<PackageReference Include="Scriban" Version="6.5.3" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
6 changes: 3 additions & 3 deletions src/Nellebot/prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Directory.Build.props", "."]
Expand All @@ -10,7 +10,7 @@ COPY [".config/dotnet-tools.json", ".config/"]
RUN dotnet restore "./Nellebot/Nellebot.csproj"
RUN dotnet restore "./Nellebot.Data.Migrations/Nellebot.Data.Migrations.csproj"
RUN dotnet tool restore
COPY ["Nellebot.sln", "."]
COPY ["Nellebot.slnx", "."]
COPY ["stylecop.json", "."]
COPY [".editorconfig", "."]
COPY ["scripts/nellebot-backup-db.sh", "."]
Expand All @@ -27,7 +27,7 @@ ARG BUILD_CONFIGURATION=Release
RUN dotnet ef migrations script --no-build --configuration $BUILD_CONFIGURATION --idempotent -p Nellebot.Data.Migrations -o /output/migrations/database_migration.sql
COPY --from=build /src/nellebot-backup-db.sh /output/migrations/

FROM mcr.microsoft.com/dotnet/runtime:9.0 AS final
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS final
RUN mkdir /keydata && \
chown $APP_UID:$APP_UID /keydata
WORKDIR /app
Expand Down
9 changes: 4 additions & 5 deletions tests/Nellebot.Tests/Nellebot.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<UserSecretsId>ed728135-e432-467b-9c68-fa5f1b5efefa</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="4.0.1" />
<PackageReference Include="MSTest.TestFramework" Version="4.0.1" />
<PackageReference Include="FluentAssertions" Version="8.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="4.1.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading