From fb4dfa532d4a9dc31c445128f8fa1be7621dd432 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 11:54:19 -0400 Subject: [PATCH 01/19] Update a selection of nuget packages --- .../Tgstation.Server.Host.Service.csproj | 2 +- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index 479e6d6b87..3632ca87e1 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index f60e60ba95..05b7d2b837 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -65,7 +65,7 @@ runtime; build; native; contentfiles; analyzers - + @@ -74,10 +74,10 @@ all runtime; build; native; contentfiles; analyzers - + - + From f39834bdaaa30f039b0ae5055857fd01d8d14601 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:07:28 -0400 Subject: [PATCH 02/19] Temporarily hide the existence of the WindowsWatchdog for the 4.0.2.0 release --- src/Tgstation.Server.Host/Core/SetupWizard.cs | 4 ++-- src/Tgstation.Server.Host/appsettings.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Core/SetupWizard.cs b/src/Tgstation.Server.Host/Core/SetupWizard.cs index 53a7708d58..08c410f54f 100644 --- a/src/Tgstation.Server.Host/Core/SetupWizard.cs +++ b/src/Tgstation.Server.Host/Core/SetupWizard.cs @@ -532,8 +532,8 @@ namespace Tgstation.Server.Host.Core newGeneralConfiguration.GitHubAccessToken = null; newGeneralConfiguration.UseExperimentalWatchdog = await PromptYesNo("Use the experimental watchdog (NOT RECOMMENDED)? (y/n): ", cancellationToken).ConfigureAwait(false); - if (!newGeneralConfiguration.UseExperimentalWatchdog && platformIdentifier.IsWindows) - newGeneralConfiguration.UseBasicWatchdogOnWindows = !await PromptYesNo("Use the TGS3 style Windows watchdog (RECOMMENDED)? (y/n): ", cancellationToken).ConfigureAwait(false); + + newGeneralConfiguration.UseBasicWatchdogOnWindows = true; return newGeneralConfiguration; } diff --git a/src/Tgstation.Server.Host/appsettings.json b/src/Tgstation.Server.Host/appsettings.json index cf71daf70c..877ed3e523 100644 --- a/src/Tgstation.Server.Host/appsettings.json +++ b/src/Tgstation.Server.Host/appsettings.json @@ -6,7 +6,7 @@ "ByondTopicTimeout": 5000, "RestartTimeout": 10000, "UseExperimentalWatchdog": false, - "UseBasicWatchdogOnWindows": false + "UseBasicWatchdogOnWindows": true }, "FileLogging": { "Directory": null, From 15fab24fa26f01665df5b9553c41b57aba3a1931 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:10:55 -0400 Subject: [PATCH 03/19] Add the dev branch to appveyor and travis --- .travis.yml | 5 +++++ appveyor.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4a93935100..2fa98e2a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,11 @@ sudo: false git: depth: 1 +branches: + only: + - dev + - master + matrix: include: - env: diff --git a/appveyor.yml b/appveyor.yml index 04c46f08be..4bb0480939 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,6 +15,7 @@ environment: branches: only: + - dev - master skip_tags: true image: Visual Studio 2019 From c12855fb539e17526fcfe6e228e88ba0bdbe189d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:12:11 -0400 Subject: [PATCH 04/19] Bump travis BYOND version --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2fa98e2a3b..0b1942913f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ matrix: - env: - DockerBuild=false - DMAPI=true - - BYOND_MAJOR="511" - - BYOND_MINOR="1385" + - BYOND_MAJOR="513" + - BYOND_MINOR="1517" - DMEName="tests/DMAPI/travistester.dme" name: "DMAPI Unit Tests" language: generic From 5ce49dfb4dc03520ab1fa3e57c84d3cfbfd4f01d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:13:36 -0400 Subject: [PATCH 05/19] Remove an unused using --- tests/Tgstation.Server.Host.Tests/Core/TestSetupWizard.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Tgstation.Server.Host.Tests/Core/TestSetupWizard.cs b/tests/Tgstation.Server.Host.Tests/Core/TestSetupWizard.cs index 55e06d42ef..04fd715b31 100644 --- a/tests/Tgstation.Server.Host.Tests/Core/TestSetupWizard.cs +++ b/tests/Tgstation.Server.Host.Tests/Core/TestSetupWizard.cs @@ -7,7 +7,6 @@ using Moq.Protected; using System; using System.Collections.Generic; using System.Data.Common; -using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; From 5c055dc727a5397005a07d7f437a19295ed450d2 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:24:55 -0400 Subject: [PATCH 06/19] Add a workflow to merge master to dev --- .github/workflows/stable-merge.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/stable-merge.yml diff --git a/.github/workflows/stable-merge.yml b/.github/workflows/stable-merge.yml new file mode 100644 index 0000000000..b90f34f17b --- /dev/null +++ b/.github/workflows/stable-merge.yml @@ -0,0 +1,28 @@ +name: 'Stable Merge' + +on: + push: + branches: + - master + +jobs: + nightly-merge: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Nightly Merge + uses: robotology/gh-action-nightly-merge@v1.2.0 + with: + stable_branch: 'master' + development_branch: 'dev' + allow_ff: true + user_name: tgstation-server + user_email: tgstation-server@users.noreply.github.com + push_token: DEV_PUSH_TOKEN + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEV_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} From 0654910b77698adc48b60cbee6f6b6692fdc1c12 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:28:20 -0400 Subject: [PATCH 07/19] Minor CONTRIBUTING.md update --- .github/CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 89c61849e6..8d81ccf5c3 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -162,6 +162,11 @@ Whenever you make a change to a model schema that must be reflected in the datab You should now have MY/MS migration files generated in `/src/Tgstation.Server.Host/Models/Migrations +## Code Versioning + +Any backwards compatible fixes made should be committed to the `master` branch if possible. These will be automatically merged into the `dev` branch. +All other changes should be made directly to the `dev` branch. These will be merged to `master` on the next minor release cycle. + ## Deployment Process Every issue/pull request in a release should share a common milestone named with the release version i.e. `4.5.3.5` From 4c5e76627e0e5c9a64ab6fa04f10fdbbaf00392c Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:40:50 -0400 Subject: [PATCH 08/19] Remove waffle badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 133c914d3d..00159826b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # tgstation-server v4: -[![Build status](https://ci.appveyor.com/api/projects/status/7t1h7bvuha0p9j5f/branch/master?svg=true)](https://ci.appveyor.com/project/Cyberboss/tgstation-server-tools/branch/master) [![Build Status](https://travis-ci.org/tgstation/tgstation-server.svg?branch=master)](https://travis-ci.org/tgstation/tgstation-server) [![codecov](https://codecov.io/gh/tgstation/tgstation-server/branch/master/graph/badge.svg)](https://codecov.io/gh/tgstation/tgstation-server) [![Waffle.io - Columns and their card count](https://badge.waffle.io/tgstation/tgstation-server.png?columns=all)](https://waffle.io/tgstation/tgstation-server?utm_source=badge) +[![Build status](https://ci.appveyor.com/api/projects/status/7t1h7bvuha0p9j5f/branch/master?svg=true)](https://ci.appveyor.com/project/Cyberboss/tgstation-server-tools/branch/master) [![Build Status](https://travis-ci.org/tgstation/tgstation-server.svg?branch=master)](https://travis-ci.org/tgstation/tgstation-server) [![codecov](https://codecov.io/gh/tgstation/tgstation-server/branch/master/graph/badge.svg)](https://codecov.io/gh/tgstation/tgstation-server) [![GitHub license](https://img.shields.io/github/license/tgstation/tgstation-server.svg)](https://github.com/tgstation/tgstation-server/blob/master/LICENSE) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/tgstation/tgstation-server.svg)](http://isitmaintained.com/project/tgstation/tgstation-server "Average time to resolve an issue") [![NuGet version](https://img.shields.io/nuget/v/Tgstation.Server.Api.svg)](https://www.nuget.org/packages/Tgstation.Server.Api) [![NuGet version](https://img.shields.io/nuget/v/Tgstation.Server.Client.svg)](https://www.nuget.org/packages/Tgstation.Server.Client) From 64cb53114c8f9c9ba1fb6c1608900d91fb6bd20c Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:53:48 -0400 Subject: [PATCH 09/19] Migrate frameworks to .NET Core 2.2 --- .../Tgstation.Server.Host.Console.csproj | 2 +- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- .../Tgstation.Server.Api.Tests.csproj | 2 +- .../Tgstation.Server.Client.Tests.csproj | 2 +- .../Tgstation.Server.Host.Console.Tests.csproj | 2 +- .../Tgstation.Server.Host.Tests.csproj | 2 +- .../Tgstation.Server.Host.Watchdog.Tests.csproj | 2 +- tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj | 2 +- tools/ReleaseNotes/ReleaseNotes.csproj | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj index 86cbf78c30..63c6d89b57 100644 --- a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj +++ b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj @@ -3,7 +3,7 @@ Exe - netcoreapp2.1 + netcoreapp2.2 Full $(TgsCoreVersion) ../../build/analyzers.ruleset diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 05b7d2b837..d1886cfcff 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -2,7 +2,7 @@ - netcoreapp2.1 + netcoreapp2.2 Full $(TgsCoreVersion) latest diff --git a/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj b/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj index 437b828ee5..558cc19231 100644 --- a/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj +++ b/tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj index aea9a97479..01093fca5d 100644 --- a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj +++ b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tests/Tgstation.Server.Host.Console.Tests/Tgstation.Server.Host.Console.Tests.csproj b/tests/Tgstation.Server.Host.Console.Tests/Tgstation.Server.Host.Console.Tests.csproj index 0164631270..66bcda4588 100644 --- a/tests/Tgstation.Server.Host.Console.Tests/Tgstation.Server.Host.Console.Tests.csproj +++ b/tests/Tgstation.Server.Host.Console.Tests/Tgstation.Server.Host.Console.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj index dcf77140ac..e68421039f 100644 --- a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj +++ b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tests/Tgstation.Server.Host.Watchdog.Tests/Tgstation.Server.Host.Watchdog.Tests.csproj b/tests/Tgstation.Server.Host.Watchdog.Tests/Tgstation.Server.Host.Watchdog.Tests.csproj index 8eec7201d2..a7957b36c4 100644 --- a/tests/Tgstation.Server.Host.Watchdog.Tests/Tgstation.Server.Host.Watchdog.Tests.csproj +++ b/tests/Tgstation.Server.Host.Watchdog.Tests/Tgstation.Server.Host.Watchdog.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj index 91b8b9acef..2fa66a64a0 100644 --- a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj +++ b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp2.2 false latest diff --git a/tools/ReleaseNotes/ReleaseNotes.csproj b/tools/ReleaseNotes/ReleaseNotes.csproj index cbffccd3ec..7757beb633 100644 --- a/tools/ReleaseNotes/ReleaseNotes.csproj +++ b/tools/ReleaseNotes/ReleaseNotes.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + netcoreapp2.2 latest From ecbb27bf32c0cd51556248863b819b24aefb9b66 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:54:54 -0400 Subject: [PATCH 10/19] Add a message to indicate npm restore is happening --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index d1886cfcff..9b47cc573a 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -26,6 +26,7 @@ + From 32bbcf546ee0b0480781ecfcf394aadac9c7cc1b Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:58:55 -0400 Subject: [PATCH 11/19] Update repo docs --- .github/CONTRIBUTING.md | 12 +++++++++--- README.md | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8d81ccf5c3..98c672779c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -34,11 +34,17 @@ You can of course, as always, ask for help at [#coderbus](irc://irc.rizon.net/co ### Development Environment -You need the Dotnet 2.1 SDK and npm>=v5.7 (in your PATH) to compile the server. In order to build the service version you also need a .NET 4.7.1 build chain +You need the Dotnet 2.2 SDK and npm>=v5.7 (in your PATH) to compile the server. In order to build the service version you also need a .NET 4.7.1 build chain -The recommended IDE is Visual Studio 2017 which has installation options for both of these. +The recommended IDE is Visual Studio 2019 which has installation options for both of these. -In order to run the integration tests you must have the environment variables `TGS4_TEST_DATABASE_TYPE` set to `MySql`, `MariaDB` or `SqlServer` and `TGS4_TEST_CONNECTION_STRING` set appropriately +In order to run the integration tests you must have the following environment variables set: +- `TGS4_TEST_DATABASE_TYPE`: `MySql`, `MariaDB` or `SqlServer`. +- `TGS4_TEST_CONNECTION_STRING`: To a valid database connection string. You can use the setup wizard to create one. + +The following environment variables aren't required but enable more tests. +- `TSG4_TEST_DISCORD_TOKEN`: To a valid discord bot token. +- `TGS4_TEST_DISCORD_CHANNEL`: To a valid discord channel ID that the above bot can access. ## Specifications diff --git a/README.md b/README.md index 00159826b7..4e7ea783b8 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Older server versions can be found in the V# branches of this repository. Note t ### Pre-Requisites -- [.NET Core Runtime (>= v2.1)](https://www.microsoft.com/net/download) If you plan to install tgstation-server as a Windows service, you should also ensure that your .NET Framework runtime version is >= v4.7.1 (Download can be found on same page). On Windows, ensure that the `dotnet` executable file is in your system's `PATH` variable (or the user's that will be running the server). +- [.NET Core Runtime (>= v2.2)](https://www.microsoft.com/net/download) If you plan to install tgstation-server as a Windows service, you should also ensure that your .NET Framework runtime version is >= v4.7.1 (Download can be found on same page). On Windows, ensure that the `dotnet` executable file is in your system's `PATH` variable (or the user's that will be running the server). - A [MariaDB](https://downloads.mariadb.org/), MySQL, or [Microsoft SQL Server](https://www.microsoft.com/en-us/download/details.aspx?id=55994) database engine is required ### Installation From 2b298ddd214d796491fcd3d80118aef721896660 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 12:59:03 -0400 Subject: [PATCH 12/19] Remove more unused usings --- src/Tgstation.Server.Client/Components/IInstanceClient.cs | 3 +-- src/Tgstation.Server.Client/IRequestLogger.cs | 3 +-- .../Components/Chat/Commands/RevisionCommand.cs | 1 - src/Tgstation.Server.Host/Components/Interop/JsonFile.cs | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Tgstation.Server.Client/Components/IInstanceClient.cs b/src/Tgstation.Server.Client/Components/IInstanceClient.cs index 21bad43280..daedcb1634 100644 --- a/src/Tgstation.Server.Client/Components/IInstanceClient.cs +++ b/src/Tgstation.Server.Client/Components/IInstanceClient.cs @@ -1,5 +1,4 @@ -using System; -using Tgstation.Server.Api.Models; +using Tgstation.Server.Api.Models; namespace Tgstation.Server.Client.Components { diff --git a/src/Tgstation.Server.Client/IRequestLogger.cs b/src/Tgstation.Server.Client/IRequestLogger.cs index 6115d283ca..2a93cfa1fd 100644 --- a/src/Tgstation.Server.Client/IRequestLogger.cs +++ b/src/Tgstation.Server.Client/IRequestLogger.cs @@ -1,5 +1,4 @@ -using System; -using System.Net.Http; +using System.Net.Http; using System.Threading; using System.Threading.Tasks; diff --git a/src/Tgstation.Server.Host/Components/Chat/Commands/RevisionCommand.cs b/src/Tgstation.Server.Host/Components/Chat/Commands/RevisionCommand.cs index 4212c0459d..b9316fe6ba 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Commands/RevisionCommand.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Commands/RevisionCommand.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; diff --git a/src/Tgstation.Server.Host/Components/Interop/JsonFile.cs b/src/Tgstation.Server.Host/Components/Interop/JsonFile.cs index 10eebe5c13..da94459801 100644 --- a/src/Tgstation.Server.Host/Components/Interop/JsonFile.cs +++ b/src/Tgstation.Server.Host/Components/Interop/JsonFile.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Tgstation.Server.Api.Models; -using Tgstation.Server.Api.Models.Internal; namespace Tgstation.Server.Host.Components.Interop { From 6e07ef6950c5ad4bf89694fc1ef5036449e69b81 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 13:03:27 -0400 Subject: [PATCH 13/19] Update Docker SDK --- build/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 420c82b0f9..635c455467 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.1-sdk AS build +FROM microsoft/dotnet:2.2-sdk AS build # install node and npm # replace shell with bash so we can source files @@ -40,7 +40,7 @@ RUN dotnet publish -c Release -o /app WORKDIR /src/src/Tgstation.Server.Host RUN dotnet publish -c Release -o /app/lib/Default && mv /app/lib/Default/appsettings* /app -FROM microsoft/dotnet:2.1-aspnetcore-runtime +FROM microsoft/dotnet:2.2-aspnetcore-runtime EXPOSE 80 #needed for byond From 08d3ac254740ee9e46f10b37018d3b3636632bc1 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 14:06:05 -0400 Subject: [PATCH 14/19] Note about Pomelo.EntityFrameworkCore.MySql --- README.md | 2 +- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e7ea783b8..0ed9580c20 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Create an `appsettings.Production.json` file next to `appsettings.json`. This wi - `Database:DatabaseType`: Can be one of `SqlServer`, `MariaDB`, or `MySql` -- `Database:MySqlServerVersion`: The version of MySql/MariaDB the database resides on, can be left as null for attempted auto detection. Used by the MySQL/MariaDB provider for selection of [certain features](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/2.1.1/src/EFCore.MySql/Storage/Internal/ServerVersion.cs) ignore at your own risk. A string in the form `..` +- `Database:MySqlServerVersion`: The version of MySql/MariaDB the database resides on, can be left as null for attempted auto detection. Used by the MySQL/MariaDB provider for selection of [certain features](https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/2.2.6/src/EFCore.MySql/Storage/Internal/ServerVersion.cs) ignore at your own risk. A string in the form `..` - `Database:ConnectionString`: Connection string for your database. Click [here](https://www.developerfusion.com/tools/sql-connection-string/) for an SQL Server generator or see [here](https://www.connectionstrings.com/mysql/) for a MySQL guide ([You should probably use '127.0.0.1' instead of 'localhost'](https://stackoverflow.com/questions/19712307/mysql-localhost-127-0-0-1)). diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 9b47cc573a..10e05ccc22 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -67,6 +67,7 @@ + From f278e7a5a76868585568d9c406b5ba0aa0954e40 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 14:07:55 -0400 Subject: [PATCH 15/19] Update various paths to point to the 2.2 version of things --- .vscode/launch.json | 2 +- build/test_core.sh | 14 +++++++------- .../Properties/launchSettings.json | 2 +- .../Tgstation.Server.Host.Console.csproj | 4 ++-- src/Tgstation.Server.Host.Watchdog/Watchdog.cs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3849aa54a5..9d6988dd3d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/Tgstation.Server.Host/bin/Debug/netcoreapp2.1/Tgstation.Server.Host.dll", + "program": "${workspaceFolder}/src/Tgstation.Server.Host/bin/Debug/netcoreapp2.2/Tgstation.Server.Host.dll", "args": [], "cwd": "${workspaceFolder}/src/Tgstation.Server.Host", // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window diff --git a/build/test_core.sh b/build/test_core.sh index 3fe4182c95..d7250796d6 100755 --- a/build/test_core.sh +++ b/build/test_core.sh @@ -10,27 +10,27 @@ source ~/.nvm/nvm.sh && nvm install 10 cd tests/Tgstation.Server.Api.Tests dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Api.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/api.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Api.Tests*]*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Api.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/api.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Api.Tests*]*" cd ../Tgstation.Server.Client.Tests dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Client.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/client.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Client.Tests*]*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Client.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/client.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Client.Tests*]*" cd ../Tgstation.Server.Host.Tests dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Host.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/host.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Host.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/host.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" cd ../Tgstation.Server.Host.Watchdog.Tests dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Host.Watchdog.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/watchdog.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Watchdog.Tests*]*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Host.Watchdog.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/watchdog.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Watchdog.Tests*]*" cd ../Tgstation.Server.Host.Console.Tests dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Host.Console.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/console.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Console.Tests*]*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Host.Console.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/console.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Host.Console.Tests*]*" cd ../Tgstation.Server.Tests export TGS4_TEST_DATABASE_TYPE=MySql @@ -39,13 +39,13 @@ export TGS4_TEST_CONNECTION_STRING="server=127.0.0.1;uid=root;pwd=;database=tgs_ #token set in CI settings dotnet build -c $CONFIG /p:CopyLocalLockFileAssemblies=true -$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/servermy.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" +$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/servermy.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" #Run again for Sqlite export TGS4_TEST_DATABASE_TYPE=Sqlite export TGS4_TEST_CONNECTION_STRING="Data Source=TravisTestDB.sqlite3;Mode=ReadWriteCreate" #Disabled due to upstream issues -#$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.1/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/serversl.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" +#$HOME/.dotnet/tools/coverlet bin/$CONFIG/netcoreapp2.2/Tgstation.Server.Tests.dll --target "dotnet" --targetargs "test -c $CONFIG --no-build" --format opencover --output "../../TestResults/serversl.xml" --include "[Tgstation.Server*]*" --exclude "[Tgstation.Server.Tests*]*" --exclude "[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations.*" cd ../../TestResults diff --git a/src/Tgstation.Server.Host.Console/Properties/launchSettings.json b/src/Tgstation.Server.Host.Console/Properties/launchSettings.json index 46f641c7ab..5b8773536a 100644 --- a/src/Tgstation.Server.Host.Console/Properties/launchSettings.json +++ b/src/Tgstation.Server.Host.Console/Properties/launchSettings.json @@ -3,7 +3,7 @@ "Tgstation.Server.Host.Console": { "commandName": "Project", "commandLineArgs": "--attach-host-debugger", - "workingDirectory": "bin\\Debug\\netcoreapp2.1", + "workingDirectory": "bin\\Debug\\netcoreapp2.2", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj index 63c6d89b57..fdb1b6513a 100644 --- a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj +++ b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj @@ -14,12 +14,12 @@ true - bin\Release\netcoreapp2.1\Tgstation.Server.Host.Console.xml + bin\Release\netcoreapp2.2\Tgstation.Server.Host.Console.xml 1701;1702;SA1652 - bin\Debug\netcoreapp2.1\Tgstation.Server.Host.Console.xml + bin\Debug\netcoreapp2.2\Tgstation.Server.Host.Console.xml diff --git a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs index 3f0fc07e47..1160fe46ff 100644 --- a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs +++ b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs @@ -86,7 +86,7 @@ namespace Tgstation.Server.Host.Watchdog Directory.Delete(assemblyStoragePath, true); Directory.CreateDirectory(defaultAssemblyPath); - var sourcePath = "../../../../Tgstation.Server.Host/bin/Debug/netcoreapp2.1"; + var sourcePath = "../../../../Tgstation.Server.Host/bin/Debug/netcoreapp2.2"; foreach (string dirPath in Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories)) Directory.CreateDirectory(dirPath.Replace(sourcePath, defaultAssemblyPath)); From ba63bb12869101e2a5779aa1018093029448372f Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 14:42:58 -0400 Subject: [PATCH 16/19] Update core version to 4.0.2.0 --- build/Version.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Version.props b/build/Version.props index 68a795b9da..f67069fccb 100644 --- a/build/Version.props +++ b/build/Version.props @@ -1,7 +1,7 @@ - 4.0.1.4 + 4.0.2 4.0.2 - 4.0.3.0 + 4.0.3 From 03e63818ceaf4b4093488542a8ad55e83c25925d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 19:00:05 -0400 Subject: [PATCH 17/19] Add swagger doc as an appveyor artifact --- appveyor.yml | 2 ++ build/BuildDox.ps1 | 3 +++ docs/API.dox | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4bb0480939..9b1a368e60 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,8 @@ artifacts: name: DMAPI - path: tgsdox name: DocumentationHtml + - path: swagger/swagger.json + name: SwaggerSpec cache: - ~\.nuget\packages -> **\*.csproj services: diff --git a/build/BuildDox.ps1 b/build/BuildDox.ps1 index 7ff89fff10..16f0616e9e 100644 --- a/build/BuildDox.ps1 +++ b/build/BuildDox.ps1 @@ -38,3 +38,6 @@ if($publish_dox){ rm -r "$doxdir/.git" } mv C:/tgsdox "$bf/tgsdox" + +# Add in the swagger specification +cp C:/swagger.json "$bf/swagger/swagger.json" diff --git a/docs/API.dox b/docs/API.dox index 4870e91407..b3b9879dab 100644 --- a/docs/API.dox +++ b/docs/API.dox @@ -7,7 +7,7 @@ TGS4 has a, from code, generated OpenAPI 3.0 specification. It is much more authorative than these documents. -The most up to date version should be found here: https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/swagger.json +The most up to date version should be found in the most recent appveyor build artifacts. It is also included in release artifacts. You can use the API explorer SwaggerUI to interact with it: https://petstore.swagger.io From 7daa6342cbba1703b72141c04a42b8b036746fa4 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 19:37:01 -0400 Subject: [PATCH 18/19] Fix swagger artifact pathing --- appveyor.yml | 2 +- build/BuildDox.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9b1a368e60..c4137ce303 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,7 +34,7 @@ artifacts: name: DMAPI - path: tgsdox name: DocumentationHtml - - path: swagger/swagger.json + - path: swagger.json name: SwaggerSpec cache: - ~\.nuget\packages -> **\*.csproj diff --git a/build/BuildDox.ps1 b/build/BuildDox.ps1 index 16f0616e9e..4d79b96727 100644 --- a/build/BuildDox.ps1 +++ b/build/BuildDox.ps1 @@ -40,4 +40,4 @@ if($publish_dox){ mv C:/tgsdox "$bf/tgsdox" # Add in the swagger specification -cp C:/swagger.json "$bf/swagger/swagger.json" +cp C:/swagger.json "$bf/swagger.json" From 5895ea37fbc18669bd82e22c085345c5e0634e3f Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 28 Mar 2020 20:11:05 -0400 Subject: [PATCH 19/19] Add swagger spec to release artifacts --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c4137ce303..a5f94499c8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -96,7 +96,7 @@ deploy: description: "$(TGSReleaseNotes)" auth_token: secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK - artifact: ServerConsole,ServerService,ServerUpdatePackage,DMAPI + artifact: ServerConsole,ServerService,ServerUpdatePackage,DMAPI,SwaggerSpec draft: $(TGSDraftNotes) prerelease: true on: