diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ba256c5..124c518 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,7 +6,7 @@ on: - main env: - VERSION: 1.15.0 + VERSION: 1.15.1 jobs: # ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами) diff --git a/Directory.Build.props b/Directory.Build.props index 29c24cc..314ee53 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 1.15.0 + 1.15.1 net10.0 preview enable diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a445230 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Toutsu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/compose.yaml b/compose.yaml index c232406..2110246 100644 --- a/compose.yaml +++ b/compose.yaml @@ -49,7 +49,7 @@ services: crond -f bot: - image: git.codeanddice.ru/toutsu/gmrelay-bot:1.15.0 + image: git.codeanddice.ru/toutsu/gmrelay-bot:1.15.1 restart: always depends_on: db: @@ -62,7 +62,7 @@ services: - gmrelay web: - image: git.codeanddice.ru/toutsu/gmrelay-web:1.15.0 + image: git.codeanddice.ru/toutsu/gmrelay-web:1.15.1 restart: always depends_on: db: diff --git a/src/GmRelay.Web/Components/Layout/NavMenu.razor b/src/GmRelay.Web/Components/Layout/NavMenu.razor index 408fdb2..c165133 100644 --- a/src/GmRelay.Web/Components/Layout/NavMenu.razor +++ b/src/GmRelay.Web/Components/Layout/NavMenu.razor @@ -56,7 +56,7 @@ - + diff --git a/tests/GmRelay.Bot.Tests/Project/LicenseFileTests.cs b/tests/GmRelay.Bot.Tests/Project/LicenseFileTests.cs new file mode 100644 index 0000000..5c6ec07 --- /dev/null +++ b/tests/GmRelay.Bot.Tests/Project/LicenseFileTests.cs @@ -0,0 +1,46 @@ +using System; +using System.IO; +using Xunit; + +namespace GmRelay.Bot.Tests.Project; + +public class LicenseFileTests +{ + private static string GetRepoRoot() + { + var dir = AppContext.BaseDirectory; + while (!string.IsNullOrEmpty(dir) && !File.Exists(Path.Combine(dir, "Directory.Build.props"))) + { + dir = Directory.GetParent(dir)?.FullName; + } + return dir ?? throw new InvalidOperationException("Could not find repo root"); + } + + [Fact] + public void LicenseFile_ExistsInRepoRoot() + { + var repoRoot = GetRepoRoot(); + var licensePath = Path.Combine(repoRoot, "LICENSE"); + Assert.True(File.Exists(licensePath), "LICENSE file should exist in repo root"); + } + + [Fact] + public void LicenseFile_ContainsMitLicenseText() + { + var repoRoot = GetRepoRoot(); + var licensePath = Path.Combine(repoRoot, "LICENSE"); + Assert.True(File.Exists(licensePath), "LICENSE file should exist"); + var content = File.ReadAllText(licensePath); + Assert.Contains("MIT License", content); + } + + [Fact] + public void Readme_ReferencesLicenseFile() + { + var repoRoot = GetRepoRoot(); + var readmePath = Path.Combine(repoRoot, "README.md"); + Assert.True(File.Exists(readmePath), "README.md should exist"); + var content = File.ReadAllText(readmePath); + Assert.Contains("./LICENSE", content); + } +}