Skip to content

Commit

Permalink
Restructure the code base into multiple modules (#124)
Browse files Browse the repository at this point in the history
* Create new project

* Fix

* Introduce  Directory.Packages.props

* Move Database stuff to new project

* Add another new project and rename Database to Data

* Move everything package related to Directory.Packages.Props

* Prepare AzzyBot.Core

* Move stuff around

* Fix building

* `dotnet format`

* Change the name of AzzyBot-Next to AzzyBot-Next.Bot

* Fix docker

* Fix CI

* Try another way for docker

* Embedd pdb files

* Enable new GC mode

* Improve test if bot is dev

* Update AzzyStatsSoftware.cs

* Really enable the new GC mode

Signed-off-by: Sellara <147769367+Sella-GH@users.noreply.github.com>

* Remove some more checks to fix bugs

* Update dependabot.yml

Signed-off-by: Sellara <147769367+Sella-GH@users.noreply.github.com>

* Update changelog

* Move AzzyBotStats.json

* Rename FileComparer

* Convert json values to null

---------

Signed-off-by: Sellara <147769367+Sella-GH@users.noreply.github.com>
  • Loading branch information
Sella-GH authored Jul 18, 2024
1 parent cf27ac9 commit 879d325
Show file tree
Hide file tree
Showing 123 changed files with 831 additions and 468 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end_of_line = crlf
[*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}]
generated_code = true

[src/AzzyBot-Next/Migrations/**]
[**/Migrations/**]
generated_code = true

# C# files
Expand Down
14 changes: 2 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ updates:
open-pull-requests-limit: 25

- package-ecosystem: "nuget" # See documentation for possible values
directory: "/src/AzzyBot-Next" # Location of package manifests
directory: "/" # Location of package manifests
schedule:
interval: "daily"
assignees:
Expand All @@ -116,18 +116,11 @@ updates:
applies-to: version-updates
patterns:
- "Microsoft.*"
- "MySqlConnector"
- "Pomelo.*"
update-types:
- "minor"
- "patch"
- "Npgsql.*"
Roslynator:
applies-to: version-updates
patterns:
- "Roslynator.*"
update-types:
- "minor"
- "patch"
Others:
applies-to: version-updates
exclude-patterns:
Expand All @@ -139,8 +132,5 @@ updates:
- "Microsoft.*"
- "Pomelo.*"
- "Roslynator.*"
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 25
milestone: 6
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Autobuild
uses: github/codeql-action/autobuild@v3
with:
working-directory: "/home/runner/work/AzzyBot/AzzyBot/src/AzzyBot-Next"
working-directory: "/home/runner/work/AzzyBot/AzzyBot/src/AzzyBot-Next.Bot"

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: kzrnm/get-net-sdk-project-versions-action@v2
id: get-version
with:
proj-path: src/AzzyBot-Next/AzzyBot-Next.csproj
proj-path: src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj

- name: Set version
id: set-version
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dotnet-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ jobs:

- name: Add some basic information
run: |
sed -i 's\Commit not found\${{ github.sha }}\g' ./artifacts/publish/AzzyBot-Next/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
sed -i 's\Compilation date not found\${{ steps.dateTime.outputs.time }}\g' ./artifacts/publish/AzzyBot-Next/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
sed -i 's\Lines of source code not found\${{ steps.loc_cs.outputs.total_lines }}\g' ./artifacts/publish/AzzyBot-Next/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
sed -i 's\Commit not found\${{ github.sha }}\g' ./artifacts/publish/AzzyBot-Next.Bot/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
sed -i 's\Compilation date not found\${{ steps.dateTime.outputs.time }}\g' ./artifacts/publish/AzzyBot-Next.Bot/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
sed -i 's\Lines of source code not found\${{ steps.loc_cs.outputs.total_lines }}\g' ./artifacts/publish/AzzyBot-Next.Bot/release_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBot.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Archive Build Artifact
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os }}-${{ matrix.arch }}
path: ./artifacts/publish/AzzyBot-Next/release_${{ matrix.os }}-${{ matrix.arch }}
path: ./artifacts/publish/AzzyBot-Next.Bot/release_${{ matrix.os }}-${{ matrix.arch }}

build-docker:
name: Build docker .zip file
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
#mv ./src/AzzyBot/Modules/MusicStreaming/Files/docker-compose.yml ./docker-zip/AzzyBot/Modules/MusicStreaming/Files/docker-compose.yml
#wget -qO ./docker-zip/AzzyBot/Modules/MusicStreaming/Files/plugins/java-lyrics-plugin-1.6.4.jar https://maven.lavalink.dev/releases/me/duncte123/java-lyrics-plugin/1.6.4/java-lyrics-plugin-1.6.4.jar
mkdir -p ./docker-zip/AzzyBot/Settings
mv ./src/AzzyBot-Next/Settings/AzzyBotSettings-Docker.json ./docker-zip/AzzyBot/Settings/AzzyBotSettings-Docker.json
mv ./src/AzzyBot-Next.Bot/Settings/AzzyBotSettings-Docker.json ./docker-zip/AzzyBot/Settings/AzzyBotSettings-Docker.json
- name: Archive docker-zip artifact
uses: actions/upload-artifact@v4
Expand All @@ -133,7 +133,7 @@ jobs:
uses: kzrnm/get-net-sdk-project-versions-action@v2
id: get-version
with:
proj-path: src/AzzyBot-Next/AzzyBot-Next.csproj
proj-path: src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj

- name: Set version
id: set-version
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Publish Debug
run: |
dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot-Next/AzzyBot-Next.csproj -c Debug -r ${{ matrix.os }}-${{ matrix.arch }}
dotnet publish /home/runner/work/AzzyBot/AzzyBot/src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj -c Debug -r ${{ matrix.os }}-${{ matrix.arch }}
#- name: Download and extract Lavalink
# run: |
Expand All @@ -69,17 +69,17 @@ jobs:

- name: Add some basic information
run: |
sed -i 's\Commit not found\${{ github.sha }}\g' ./artifacts/publish/AzzyBot-Next/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
sed -i 's\Compilation date not found\${{ steps.dateTime.outputs.time }}\g' ./artifacts/publish/AzzyBot-Next/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
sed -i 's\Lines of source code not found\${{ steps.loc_cs.outputs.total_lines }}\g' ./artifacts/publish/AzzyBot-Next/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
sed -i 's\Commit not found\${{ github.sha }}\g' ./artifacts/publish/AzzyBot-Next.Bot/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
sed -i 's\Compilation date not found\${{ steps.dateTime.outputs.time }}\g' ./artifacts/publish/AzzyBot-Next.Bot/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
sed -i 's\Lines of source code not found\${{ steps.loc_cs.outputs.total_lines }}\g' ./artifacts/publish/AzzyBot-Next.Bot/debug_${{ matrix.os }}-${{ matrix.arch }}/Modules/Core/Files/AzzyBotStats.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Archive Build Artifact
uses: actions/upload-artifact@v4
with:
name: debug-${{ matrix.os }}-${{ matrix.arch }}
path: ./artifacts/publish/AzzyBot-Next/debug_${{ matrix.os }}-${{ matrix.arch }}
path: ./artifacts/publish/AzzyBot-Next.Bot/debug_${{ matrix.os }}-${{ matrix.arch }}

build-docker:
name: Build docker .zip file
Expand All @@ -106,7 +106,7 @@ jobs:
#mv ./src/AzzyBot/Modules/MusicStreaming/Files/docker-compose.yml ./docker-zip/AzzyBot/Modules/MusicStreaming/Files/docker-compose.yml
#wget -qO ./docker-zip/AzzyBot/Modules/MusicStreaming/Files/plugins/java-lyrics-plugin-1.6.4.jar https://maven.lavalink.dev/releases/me/duncte123/java-lyrics-plugin/1.6.4/java-lyrics-plugin-1.6.4.jar
mkdir -p ./docker-zip/AzzyBot/Settings
mv ./src/AzzyBot-Next/Settings/AzzyBotSettings-Docker.json ./docker-zip/AzzyBot/Settings/AzzyBotSettings-Docker.json
mv ./src/AzzyBot-Next.Bot/Settings/AzzyBotSettings-Docker.json ./docker-zip/AzzyBot/Settings/AzzyBotSettings-Docker.json
- name: Archive docker-zip artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: kzrnm/get-net-sdk-project-versions-action@v2
id: get-version
with:
proj-path: src/AzzyBot-Next/AzzyBot-Next.csproj
proj-path: src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj

- name: Compare tags
id: compare
Expand Down
67 changes: 54 additions & 13 deletions AzzyBot.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# 17
VisualStudioVersion = 17.7.34202.233
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzzyBot", "src\AzzyBot\AzzyBot.csproj", "{91AAAF0E-4931-4247-BE86-74C595C7D5FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzzyBot-Next", "src\AzzyBot-Next\AzzyBot-Next.csproj", "{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzzyBot-Next.Bot", "src\AzzyBot-Next.Bot\AzzyBot-Next.Bot.csproj", "{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzzyBot-Next.Data", "src\AzzyBot-Next.Data\AzzyBot-Next.Data.csproj", "{AEE73B92-94B6-4F6A-B29B-19C363B3D305}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzzyBot-Next.Core", "src\AzzyBot-Next.Core\AzzyBot-Next.Core.csproj", "{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -23,29 +28,17 @@ Global
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|ARM64.ActiveCfg = Debug|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|ARM64.Build.0 = Debug|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|x64.ActiveCfg = Debug|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Debug|x64.Build.0 = Debug|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|Any CPU.ActiveCfg = Docker|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|Any CPU.Build.0 = Docker|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|ARM64.ActiveCfg = Docker|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|ARM64.Build.0 = Docker|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|x64.ActiveCfg = Docker|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker|x64.Build.0 = Docker|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|Any CPU.ActiveCfg = Docker-debug|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|Any CPU.Build.0 = Docker-debug|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|ARM64.ActiveCfg = Docker-debug|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|ARM64.Build.0 = Docker-debug|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|x64.ActiveCfg = Docker-debug|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Docker-debug|x64.Build.0 = Docker-debug|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|Any CPU.Build.0 = Release|Any CPU
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|ARM64.ActiveCfg = Release|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|ARM64.Build.0 = Release|ARM64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|x64.ActiveCfg = Release|x64
{91AAAF0E-4931-4247-BE86-74C595C7D5FC}.Release|x64.Build.0 = Release|x64
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
Expand All @@ -70,6 +63,54 @@ Global
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Release|ARM64.Build.0 = Release|Any CPU
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Release|x64.ActiveCfg = Release|Any CPU
{6B05D8A4-AC04-4EA3-B625-C69DFE68761E}.Release|x64.Build.0 = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|ARM64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|x64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Debug|x64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|Any CPU.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|Any CPU.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|ARM64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|ARM64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|x64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker|x64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|Any CPU.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|ARM64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|ARM64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|x64.ActiveCfg = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Docker-debug|x64.Build.0 = Debug|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|Any CPU.Build.0 = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|ARM64.ActiveCfg = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|ARM64.Build.0 = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|x64.ActiveCfg = Release|Any CPU
{AEE73B92-94B6-4F6A-B29B-19C363B3D305}.Release|x64.Build.0 = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|ARM64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|x64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Debug|x64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|Any CPU.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|Any CPU.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|ARM64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|ARM64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|x64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker|x64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|Any CPU.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|ARM64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|ARM64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|x64.ActiveCfg = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Docker-debug|x64.Build.0 = Debug|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|Any CPU.Build.0 = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|ARM64.ActiveCfg = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|ARM64.Build.0 = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|x64.ActiveCfg = Release|Any CPU
{F2B56EF4-FC0A-4DC8-8C71-D8245EC562BF}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.0.0-preview4
### General
- Removed not needed internal events, meaning the performance should be *slightly* better
- Restructured the whole codebase to make it more readable and maintainable

### Improvements
- The local station cache file is now also deleted when the station or the instance is deleted
Expand Down
19 changes: 19 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="CsvHelper" Version="33.0.1" />
<PackageVersion Include="DSharpPlus" Version="5.0.0-nightly-02271" />
<PackageVersion Include="DSharpPlus.Commands" Version="5.0.0-nightly-02271" />
<PackageVersion Include="DSharpPlus.Interactivity" Version="5.0.0-nightly-02271" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.4" />
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.4" />
<PackageVersion Include="Roslynator.CodeFixes" Version="4.12.4" />
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.12.4" />
<PackageVersion Include="Roslynator.Refactorings" Version="4.12.4" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
USER root
RUN apt update && apt upgrade -y && apt autoremove -y
WORKDIR /build
COPY ./src/AzzyBot-Next ./
RUN dotnet restore ./AzzyBot-Next.csproj
COPY ./ ./
RUN dotnet restore ./src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj
ARG ARCH
ARG CONFIG
ARG OS
RUN dotnet publish ./AzzyBot-Next.csproj -a $ARCH -c $CONFIG --os $OS -o out
RUN dotnet publish ./src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj -a $ARCH -c $CONFIG --os $OS -o out

# RUNNER IMAGE
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim
Expand Down Expand Up @@ -40,4 +40,4 @@ USER azzy
# Start the app
WORKDIR /app

ENTRYPOINT ["dotnet", "AzzyBot-Docker.dll"]
ENTRYPOINT ["dotnet", "AzzyBot-Docker.dll"]
8 changes: 4 additions & 4 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
USER root
RUN apt update && apt upgrade -y && apt autoremove -y
WORKDIR /build
COPY ./src/AzzyBot-Next ./
RUN dotnet restore ./AzzyBot-Next.csproj
COPY ./ ./
RUN dotnet restore ./src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj
ARG ARCH
ARG CONFIG
ARG OS
RUN dotnet publish ./AzzyBot-Next.csproj -a $ARCH -c $CONFIG --os $OS -o out
RUN dotnet publish ./src/AzzyBot-Next.Bot/AzzyBot-Next.Bot.csproj -a $ARCH -c $CONFIG --os $OS -o out

# RUNNER IMAGE
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim
Expand Down Expand Up @@ -40,4 +40,4 @@ USER azzy
# Start the app
WORKDIR /app

ENTRYPOINT ["dotnet", "AzzyBot-Docker-Dev.dll"]
ENTRYPOINT ["dotnet", "AzzyBot-Docker-Dev.dll"]
Loading

0 comments on commit 879d325

Please sign in to comment.