Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01c49f2df0 | |||
| 9deccd3a9d | |||
| 81d4ec2c97 |
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
|
||||
env:
|
||||
VERSION: 1.15.0
|
||||
VERSION: 1.15.1
|
||||
|
||||
jobs:
|
||||
# ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.15.0</Version>
|
||||
<Version>1.15.1</Version>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -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.
|
||||
+2
-2
@@ -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:
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="nav-version">v1.15.0</div>
|
||||
<div class="nav-version">v1.15.1</div>
|
||||
</div>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
|
||||
@@ -20,6 +20,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS final
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libgssapi-krb5-2 && rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=build /app/publish .
|
||||
RUN mkdir -p /app/dataprotection-keys && chown -R $APP_UID:$APP_UID /app/dataprotection-keys
|
||||
ENV ASPNETCORE_URLS=http://+:8080
|
||||
EXPOSE 8080
|
||||
USER $APP_UID
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user