- dotnet build "src/Impostor.Client/Impostor.Client.WinForms/Impostor.Client.WinForms.csproj" /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None
# Server win-x64
- dotnet publish -c release -o build/win-x64 -f net5.0 -r win-x64 --self-contained --no-restore ./src/Impostor.Server/Impostor.Server.csproj /p:PublishSingleFile=true
- - 7z a -r build/win-x64.zip %APPVEYOR_BUILD_FOLDER%/build/win-x64/*
+ - ps: 7z a -r build/Impostor-Server-win-x64-$(APPVEYOR_BUILD_VERSION).zip %APPVEYOR_BUILD_FOLDER%/build/win-x64/*
# Server linux-x64
- dotnet publish -c release -o ./build/linux-x64 -f net5.0 -r linux-x64 --self-contained --no-restore ./src/Impostor.Server/Impostor.Server.csproj /p:PublishSingleFile=true
- - 7z a -r build/linux-x64.zip %APPVEYOR_BUILD_FOLDER%/build/linux-x64/*
+ - ps: z a -r build/Impostor-Server-linux-x64-$(APPVEYOR_BUILD_VERSION).zip %APPVEYOR_BUILD_FOLDER%/build/linux-x64/*
test_script:
- dotnet test --no-build --no-restore -v normal -f net5.0 -c Release "src/Impostor.Tests"
artifacts:
- - path: build/win-x64.zip
- name: Impostor-Server-win-x64.zip
- - path: build/linux-x64.zip
- name: Impostor-Server-linux-x64.zip
+ - path: build/Impostor-Server-win-x64-$(APPVEYOR_BUILD_VERSION).zip
+ name: Impostor-Server-win-x64-$(APPVEYOR_BUILD_VERSION).zip
+ - path: build/Impostor-Server-linux-x64-$(APPVEYOR_BUILD_VERSION).zip
+ name: Impostor-Server-linux-x64-$(APPVEYOR_BUILD_VERSION).zip
only_commits:
files:
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Impostor.Server</RootNamespace>
<Nullable>enable</Nullable>
+ <DebugType Condition=" '$(Configuration)' == 'Release' ">None</DebugType>
<CodeAnalysisRuleSet>ProjectRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType Condition=" '$(Configuration)' == 'Release' ">None</DebugType>
</PropertyGroup>
<ItemGroup>
private readonly IMatchmaker _matchmaker;
public MatchmakerService(
- ILogger<MatchmakerService> logger,
- IOptions<ServerConfig> serverConfig,
+ ILogger<MatchmakerService> logger,
+ IOptions<ServerConfig> serverConfig,
IOptions<ServerRedirectorConfig> redirectorConfig,
IMatchmaker matchmaker)
{
_redirectorConfig = redirectorConfig.Value;
_matchmaker = matchmaker;
}
-
+
public async Task StartAsync(CancellationToken cancellationToken)
{
var endpoint = new IPEndPoint(IPAddress.Parse(_serverConfig.ListenIp), _serverConfig.ListenPort);
-
+
await _matchmaker.StartAsync(endpoint);
-
- _logger.LogInformation("Matchmaker is listening on {0}:{1}, the public server ip is {2}:{3}.",
- endpoint.Address,
+
+ _logger.LogInformation(
+ "Matchmaker is listening on {0}:{1}, the public server ip is {2}:{3}.",
+ endpoint.Address,
endpoint.Port,
- _serverConfig.PublicIp,
+ _serverConfig.PublicIp,
_serverConfig.PublicPort);
if (_redirectorConfig.Enabled)
<Rule Id="SA1309" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.SpacingRules">
+ <Rule Id="SA1003" Action="None" />
<Rule Id="SA1009" Action="None" />
</Rules>
</RuleSet>
\ No newline at end of file