Merge pull request #1489 from tgstation/LimitSystemMessageChannels

Add option for selecting channels for system messages
This commit is contained in:
Jordan Dominion
2023-05-20 21:32:03 -04:00
committed by GitHub
51 changed files with 4595 additions and 158 deletions
+2
View File
@@ -21,6 +21,8 @@ build/**
!build/stylecop.json
!build/Version.props
!build/ControlPanelVersion.props
!build/Common.props
!build/NugetCommon.props
docs
src/DMAPI
src/Tgstation.Server.Host/ClientApp
+2
View File
@@ -173,6 +173,8 @@ Whenever you make a change to a model schema that must be reflected in the datab
We have a script to do this.
Warning: You may need to temporarily set valid MySql credentials in [MySqlDesignTimeDbContextFactory.cs](../src/Tgstation.Server.Host/Database/Design/MySqlDesignTimeDbContextFactory.cs) for migrations to generate properly. I have no idea why. Be careful not to commit the change.
1. Run `build/GenerateMigrations.sh NameOfMigration` from the project root.
1. You should now have MY/MS/SL/PG migration files generated in `/src/Tgstation.Server.Host/Models/Migrations`. Fix compiler warnings in the generated files. Ensure all classes are in the Tgstation.Server.Host.Database.Migrations namespace.
1. Manually review what each migration does.
+10
View File
@@ -0,0 +1,10 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Version.props" />
<PropertyGroup>
<TgsNetVersion>net6.0</TgsNetVersion>
<TgsNugetNetVersion>netstandard2.0</TgsNugetNetVersion>
<LangVersion>latest</LangVersion>
<DebugType>Full</DebugType>
</PropertyGroup>
</Project>
+2
View File
@@ -25,6 +25,8 @@ RUN npm install -g yarn
# Build web control panel
WORKDIR /repo/build
COPY build/Common.props Common.props
COPY build/NugetCommon.props NugetCommon.props
COPY build/Version.props Version.props
COPY build/ControlPanelVersion.props ControlPanelVersion.props
+23
View File
@@ -0,0 +1,23 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Common.props" />
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss/Dominion</Authors>
<Company>/tg/station 13</Company>
<PackageProjectUrl>https://tgstation.github.io/tgstation-server</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.png</PackageIcon>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<Copyright>2018-2023</Copyright>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../build/tgs.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
-1
View File
@@ -13,6 +13,5 @@
<TgsHostWatchdogVersion>1.2.2</TgsHostWatchdogVersion>
<TgsContainerScriptVersion>1.2.1</TgsContainerScriptVersion>
<TgsMigratorVersion>1.0.1</TgsMigratorVersion>
<TgsNetVersion>net6.0</TgsNetVersion>
</PropertyGroup>
</Project>
@@ -25,6 +25,12 @@ namespace Tgstation.Server.Api.Models.Internal
[Required]
public bool? IsUpdatesChannel { get; set; }
/// <summary>
/// If the <see cref="ChatChannel"/> received system messages.
/// </summary>
[Required]
public bool? IsSystemChannel { get; set; }
/// <summary>
/// A custom tag users can define to group channels together.
/// </summary>
@@ -1,29 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/NugetCommon.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<TargetFramework>$(TgsNugetNetVersion)</TargetFramework>
<Version>$(TgsApiLibraryVersion)</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss/Dominion</Authors>
<Company>/tg/station 13</Company>
<Description>API definitions for tgstation-server.</Description>
<PackageProjectUrl>https://tgstation.github.io/tgstation-server</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.png</PackageIcon>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<Copyright>2018-2023</Copyright>
<PackageTags>json web api tgstation-server tgstation ss13 byond http</PackageTags>
<PackageReleaseNotes>Minor documentation correction.</PackageReleaseNotes>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Tgstation.Server.Api.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
<NoWarn>CA1028</NoWarn>
</PropertyGroup>
@@ -61,7 +47,5 @@
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../build/tgs.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
@@ -1,29 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/NugetCommon.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<TargetFramework>$(TgsNugetNetVersion)</TargetFramework>
<Version>$(TgsClientVersion)</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss/Dominion</Authors>
<Company>/tg/station 13</Company>
<Description>Client library for tgstation-server.</Description>
<PackageProjectUrl>https://tgstation.github.io/tgstation-server</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.png</PackageIcon>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<Copyright>2018-2023</Copyright>
<PackageTags>json web api tgstation-server tgstation ss13 byond client http</PackageTags>
<PackageReleaseNotes>Added missing Dispose() call to the StringContents for requests with bodies and added missing ConfigureAwait(false) to async call.</PackageReleaseNotes>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Tgstation.Server.Client.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
@@ -46,7 +32,5 @@
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../build/tgs.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
@@ -1,29 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/NugetCommon.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<TargetFramework>$(TgsNugetNetVersion)</TargetFramework>
<Version>$(TgsCoreVersion)</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss/Dominion</Authors>
<Company>/tg/station 13</Company>
<Description>Common functions for tgstation-server.</Description>
<PackageProjectUrl>https://tgstation.github.io/tgstation-server</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.png</PackageIcon>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<Copyright>2018-2023</Copyright>
<PackageTags>web tgstation-server tgstation ss13 byond client http</PackageTags>
<PackageReleaseNotes>Initial release.</PackageReleaseNotes>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Tgstation.Server.Client.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
@@ -41,7 +27,5 @@
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<None Include="../../build/tgs.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Tgstation.Server.Host.Shared.xml</DocumentationFile>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<DebugType>Full</DebugType>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -1,16 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<RuntimeIdentifier>win</RuntimeIdentifier>
<DebugType>Full</DebugType>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.3</LangVersion>
<DocumentationFile>bin\Debug\Tgstation.Server.Host.Console.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(RuntimeIdentifier)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -1,16 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
<Version>$(TgsHostWatchdogVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Tgstation.Server.Host.Watchdog.xml</DocumentationFile>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.15",
"version": "6.0.16",
"commands": [
"dotnet-ef"
]
@@ -30,6 +30,11 @@
/// </summary>
public bool IsAdminChannel { get; set; }
/// <summary>
/// If the <see cref="Channel"/> is a system messages channel.
/// </summary>
public bool IsSystemChannel { get; set; }
/// <summary>
/// The <see cref="ChannelRepresentation"/> with the mapped Id.
/// </summary>
@@ -207,6 +207,7 @@ namespace Tgstation.Server.Host.Components.Chat
IrcChannel = apiModel.IrcChannel,
IsAdminChannel = apiModel.IsAdminChannel,
IsUpdatesChannel = apiModel.IsUpdatesChannel,
IsSystemChannel = apiModel.IsSystemChannel,
IsWatchdogChannel = apiModel.IsWatchdogChannel,
Tag = apiModel.Tag,
})
@@ -220,6 +221,7 @@ namespace Tgstation.Server.Host.Components.Chat
IsWatchdogChannel = kvp.Key.IsWatchdogChannel == true,
IsUpdatesChannel = kvp.Key.IsUpdatesChannel == true,
IsAdminChannel = kvp.Key.IsAdminChannel == true,
IsSystemChannel = kvp.Key.IsSystemChannel == true,
ProviderChannelId = channelRepresentation.RealId,
ProviderId = connectionId,
Channel = channelRepresentation,
@@ -514,7 +516,7 @@ namespace Tgstation.Server.Host.Components.Chat
List<ulong> wdChannels;
lock (mappedChannels) // so it doesn't change while we're using it
wdChannels = mappedChannels
.Where(x => !x.Value.Channel.IsPrivateChannel)
.Where(x => !x.Value.IsSystemChannel)
.Select(x => x.Key)
.ToList();
@@ -19,7 +19,12 @@ namespace Tgstation.Server.Host.Components.Session
/// <param name="logger">The value of <see cref="logger"/>.</param>
public TopicClientFactory(ILogger<TopicClient> logger)
{
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
if (logger == null)
throw new ArgumentNullException(nameof(logger));
// Don't want the debug logs Topic client spits out either, they're too verbose
if (logger.IsEnabled(LogLevel.Trace))
this.logger = logger;
}
/// <inheritdoc />
@@ -387,8 +387,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
using (await SemaphoreSlimContext.Lock(synchronizationSemaphore, ct))
await LaunchNoLock(true, true, true, reattachInfo, ct);
},
cancellationToken)
;
cancellationToken);
}
/// <inheritdoc />
@@ -71,6 +71,7 @@ namespace Tgstation.Server.Host.Controllers
IsAdminChannel = api.IsAdminChannel ?? false,
IsWatchdogChannel = api.IsWatchdogChannel ?? false,
IsUpdatesChannel = api.IsUpdatesChannel ?? false,
IsSystemChannel = api.IsSystemChannel ?? false,
Tag = api.Tag,
};
@@ -379,22 +379,22 @@ namespace Tgstation.Server.Host.Database
/// <summary>
/// Used by unit tests to remind us to setup the correct MSSQL migration downgrades.
/// </summary>
internal static readonly Type MSLatestMigration = typeof(MSAddReattachInfoInitialCompileJob);
internal static readonly Type MSLatestMigration = typeof(MSAddSystemChannels);
/// <summary>
/// Used by unit tests to remind us to setup the correct MYSQL migration downgrades.
/// </summary>
internal static readonly Type MYLatestMigration = typeof(MYAddReattachInfoInitialCompileJob);
internal static readonly Type MYLatestMigration = typeof(MYAddSystemChannels);
/// <summary>
/// Used by unit tests to remind us to setup the correct PostgresSQL migration downgrades.
/// </summary>
internal static readonly Type PGLatestMigration = typeof(PGAddReattachInfoInitialCompileJob);
internal static readonly Type PGLatestMigration = typeof(PGAddSystemChannels);
/// <summary>
/// Used by unit tests to remind us to setup the correct SQLite migration downgrades.
/// </summary>
internal static readonly Type SLLatestMigration = typeof(SLAddReattachInfoInitialCompileJob);
internal static readonly Type SLLatestMigration = typeof(SLAddSystemChannels);
/// <inheritdoc />
#pragma warning disable CA1502 // Cyclomatic complexity
@@ -425,6 +425,15 @@ namespace Tgstation.Server.Host.Database
string BadDatabaseType() => throw new ArgumentException($"Invalid DatabaseType: {currentDatabaseType}", nameof(currentDatabaseType));
if (targetVersion < new Version(5, 13, 0))
targetMigration = currentDatabaseType switch
{
DatabaseType.MySql => nameof(MYAddReattachInfoInitialCompileJob),
DatabaseType.PostgresSql => nameof(PGAddReattachInfoInitialCompileJob),
DatabaseType.SqlServer => nameof(MSAddReattachInfoInitialCompileJob),
DatabaseType.Sqlite => nameof(SLAddReattachInfoInitialCompileJob),
_ => BadDatabaseType(),
};
if (targetVersion < new Version(5, 7, 3))
targetMigration = currentDatabaseType switch
{
@@ -14,6 +14,6 @@ namespace Tgstation.Server.Host.Database.Design
=> new MySqlDatabaseContext(
DesignTimeDbContextFactoryHelpers.CreateDatabaseContextOptions<MySqlDatabaseContext>(
DatabaseType.MariaDB,
"Server=127.0.0.1;User Id=root;Password=fake;Database=TGS_Design"));
"Server=127.0.0.1;User Id=root;Password=zdxfOOTlQFnklwzytzCj;Database=TGS_Design"));
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Tgstation.Server.Host.Database.Migrations
{
/// <summary>
/// Adds the IsSystemChannel chat channel option for MSSQL.
/// </summary>
public partial class MSAddSystemChannels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.AddColumn<bool>(
name: "IsSystemChannel",
table: "ChatChannels",
type: "bit",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.DropColumn(
name: "IsSystemChannel",
table: "ChatChannels");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Tgstation.Server.Host.Database.Migrations
{
/// <summary>
/// Adds the IsSystemChannel chat channel option for MYSQL.
/// </summary>
public partial class MYAddSystemChannels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.AddColumn<bool>(
name: "IsSystemChannel",
table: "ChatChannels",
type: "tinyint(1)",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.DropColumn(
name: "IsSystemChannel",
table: "ChatChannels");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Tgstation.Server.Host.Database.Migrations
{
/// <summary>
/// Adds the IsSystemChannel chat channel option for PostgresSQL.
/// </summary>
public partial class PGAddSystemChannels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.AddColumn<bool>(
name: "IsSystemChannel",
table: "ChatChannels",
type: "boolean",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.DropColumn(
name: "IsSystemChannel",
table: "ChatChannels");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Tgstation.Server.Host.Database.Migrations
{
/// <summary>
/// Adds the IsSystemChannel chat channel option for SQLite.
/// </summary>
public partial class SLAddSystemChannels : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.AddColumn<bool>(
name: "IsSystemChannel",
table: "ChatChannels",
type: "INTEGER",
nullable: false,
defaultValue: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
if (migrationBuilder == null)
throw new ArgumentNullException(nameof(migrationBuilder));
migrationBuilder.DropColumn(
name: "IsSystemChannel",
table: "ChatChannels");
}
}
}
@@ -16,7 +16,7 @@ namespace Tgstation.Server.Host.Database.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.15")
.HasAnnotation("ProductVersion", "6.0.16")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
@@ -84,6 +84,10 @@ namespace Tgstation.Server.Host.Database.Migrations
.IsRequired()
.HasColumnType("tinyint(1)");
b.Property<bool?>("IsSystemChannel")
.IsRequired()
.HasColumnType("tinyint(1)");
b.Property<bool?>("IsUpdatesChannel")
.IsRequired()
.HasColumnType("tinyint(1)");
@@ -16,7 +16,7 @@ namespace Tgstation.Server.Host.Database.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.15")
.HasAnnotation("ProductVersion", "6.0.16")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -84,6 +84,10 @@ namespace Tgstation.Server.Host.Database.Migrations
.IsRequired()
.HasColumnType("boolean");
b.Property<bool?>("IsSystemChannel")
.IsRequired()
.HasColumnType("boolean");
b.Property<bool?>("IsUpdatesChannel")
.IsRequired()
.HasColumnType("boolean");
@@ -16,7 +16,7 @@ namespace Tgstation.Server.Host.Database.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.15")
.HasAnnotation("ProductVersion", "6.0.16")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
@@ -84,6 +84,10 @@ namespace Tgstation.Server.Host.Database.Migrations
.IsRequired()
.HasColumnType("bit");
b.Property<bool?>("IsSystemChannel")
.IsRequired()
.HasColumnType("bit");
b.Property<bool?>("IsUpdatesChannel")
.IsRequired()
.HasColumnType("bit");
@@ -15,7 +15,7 @@ namespace Tgstation.Server.Host.Database.Migrations
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.15");
modelBuilder.HasAnnotation("ProductVersion", "6.0.16");
modelBuilder.Entity("Tgstation.Server.Host.Models.ChatBot", b =>
{
@@ -78,6 +78,10 @@ namespace Tgstation.Server.Host.Database.Migrations
.IsRequired()
.HasColumnType("INTEGER");
b.Property<bool?>("IsSystemChannel")
.IsRequired()
.HasColumnType("INTEGER");
b.Property<bool?>("IsUpdatesChannel")
.IsRequired()
.HasColumnType("INTEGER");
@@ -49,6 +49,7 @@ namespace Tgstation.Server.Host.Models
IsAdminChannel = IsAdminChannel,
IsWatchdogChannel = IsWatchdogChannel,
IsUpdatesChannel = IsUpdatesChannel,
IsSystemChannel = IsSystemChannel,
Tag = Tag,
};
}
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<DebugType>Full</DebugType>
<Version>$(TgsCoreVersion)</Version>
<LangVersion>latest</LangVersion>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
<DocumentationFile>bin\$(Configuration)\net6.0\Tgstation.Server.Host.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
<NoWarn>API1000</NoWarn>
</PropertyGroup>
@@ -70,36 +68,36 @@
<!-- Usage: IRC interop -->
<PackageReference Include="Cyberboss.SmartIrc4net.Standard" Version="0.4.7" />
<!-- Usage: Text formatter for Elasticsearch logging plugin -->
<PackageReference Include="Elastic.CommonSchema.Serilog" Version="1.5.3" />
<PackageReference Include="Elastic.CommonSchema.Serilog" Version="8.6.0" />
<!-- Usage: GitLab interop -->
<PackageReference Include="GitLabApiClient" Version="1.8.0" />
<!-- Usage: git interop -->
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<!-- Usage: JWT injection into HTTP pipeline -->
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.16" />
<!-- Usage: Support ""legacy"" Newotonsoft.Json in HTTP pipeline. The rest of our codebase uses Newtonsoft. -->
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.16" />
<!-- Usage: Database ORM -->
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.16" />
<!-- Usage: Automatic migration generation using command line -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.15">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.16">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Usage: Sqlite ORM plugin -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.16" />
<!-- Usage: MSSQL ORM plugin -->
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.16" />
<!-- Usage: Included transitively through other packages, workaround for https://github.com/coverlet-coverage/coverlet/issues/1381 -->
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.3" />
<!-- Usage: POSIX support for syscalls, signals, and symlinks -->
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<!-- Usage: YAML config plugin -->
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.0.0" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<!-- Usage: PostgresSQL ORM plugin -->
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.8" />
<!-- Usage: GitHub.com interop -->
<PackageReference Include="Octokit" Version="5.0.3" />
<PackageReference Include="Octokit" Version="6.0.0" />
<!-- Usage: MYSQL/MariaDB ORM plugin -->
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
<!-- Usage: Discord interop -->
@@ -112,7 +110,7 @@
<!-- Usage: Console logging plugin -->
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<!-- Usage: Elasticsearch logging plugin -->
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.1" />
<!-- Usage: File logging plugin -->
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<!-- Usage: Linting -->
@@ -129,11 +127,11 @@
<!-- Usage: Windows authentication plugin allowing searching for users by name -->
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="6.0.0" />
<!-- Usage: JWT plugin needed to undo some Microsoft meddling in the HTTP pipeline -->
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.28.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.30.1" />
<!-- Usage: Identifying owning user of Windows Process objects -->
<PackageReference Include="System.Management" Version="6.0.0" />
<!-- Usage: .DeleteAsync() support for IQueryable<T>s -->
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.20.1" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.22.0" />
</ItemGroup>
<ItemGroup>
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Headers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,12 +10,12 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
</ItemGroup>
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,11 +10,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,11 +10,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
@@ -2,14 +2,11 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<ItemGroup>
@@ -17,11 +14,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
@@ -1,11 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,11 +10,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
@@ -1,16 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<ItemGroup>
@@ -18,11 +15,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
@@ -85,6 +85,7 @@ namespace Tgstation.Server.Tests.Live.Instance
IsAdminChannel = false,
IsUpdatesChannel = true,
IsWatchdogChannel = true,
IsSystemChannel = true,
Tag = "butt2",
ChannelData = channelId,
#pragma warning disable CS0618
@@ -98,6 +99,7 @@ namespace Tgstation.Server.Tests.Live.Instance
Assert.IsNotNull(updatedBot.Channels);
Assert.AreEqual(1, updatedBot.Channels.Count);
Assert.AreEqual(false, updatedBot.Channels.First().IsAdminChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsSystemChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsUpdatesChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsWatchdogChannel);
Assert.AreEqual("butt2", updatedBot.Channels.First().Tag);
@@ -160,6 +162,7 @@ namespace Tgstation.Server.Tests.Live.Instance
IsAdminChannel = true,
IsUpdatesChannel = true,
IsWatchdogChannel = true,
IsSystemChannel = true,
Tag = "butt",
ChannelData = channelId.ToString(),
#pragma warning disable CS0618
@@ -172,6 +175,7 @@ namespace Tgstation.Server.Tests.Live.Instance
Assert.AreEqual(true, updatedBot.Enabled);
Assert.IsNotNull(updatedBot.Channels);
Assert.AreEqual(1, updatedBot.Channels.Count);
Assert.AreEqual(true, updatedBot.Channels.First().IsSystemChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsAdminChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsUpdatesChannel);
Assert.AreEqual(true, updatedBot.Channels.First().IsWatchdogChannel);
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -12,11 +10,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1">
<PackageReference Include="GitHubActionsTestLogger" Version="2.2.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
+3 -1
View File
@@ -25,10 +25,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
ProjectSection(SolutionItems) = preProject
build\analyzers.ruleset = build\analyzers.ruleset
build\BuildDox.ps1 = build\BuildDox.ps1
build\Common.props = build\Common.props
build\ControlPanelVersion.props = build\ControlPanelVersion.props
build\coverlet.runsettings = build\coverlet.runsettings
build\Dockerfile = build\Dockerfile
build\GenerateMigrations.sh = build\GenerateMigrations.sh
build\NugetCommon.props = build\NugetCommon.props
build\OpenApiValidationSettings.json = build\OpenApiValidationSettings.json
build\stylecop.json = build\stylecop.json
build\tgs.docker.sh = build\tgs.docker.sh
@@ -193,7 +195,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Migrator.C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Host.Common", "src\Tgstation.Server.Host.Common\Tgstation.Server.Host.Common.csproj", "{CF3968A0-EA81-4464-B2D4-C7D40F6B5BCB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.Common", "src\Tgstation.Server.Common\Tgstation.Server.Common.csproj", "{70CD9A98-D31A-44A4-81D1-D02764CEEEFD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Common", "src\Tgstation.Server.Common\Tgstation.Server.Common.csproj", "{70CD9A98-D31A-44A4-81D1-D02764CEEEFD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+1 -2
View File
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
@@ -204,6 +204,7 @@ static class Program
IsWatchdogChannel = providerInfo.WatchdogChannels.Any(x => NormalizeChannelId(x) == channelIdentifier),
IsAdminChannel = providerInfo.AdminChannels.Any(x => NormalizeChannelId(x) == channelIdentifier),
IsUpdatesChannel = providerInfo.DevChannels.Any(x => NormalizeChannelId(x) == channelIdentifier),
// system channels are too new a feature to target
ChannelData = channelIdentifier,
};
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<Version>$(TgsMigratorVersion)</Version>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<Import Project="../../build/Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>$(TgsNetVersion)</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<Version>$(TgsMigratorVersion)</Version>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>CA1416</NoWarn>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>