diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 0139ecf6e5..b0492e230c 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -75,7 +75,7 @@ jobs: name: CI Start Gate needs: security-checkpoint runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || github.event_name == 'schedule' || (github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event_name != 'pull_request_target'))))" + if: (!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || github.event_name == 'schedule' || (github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event_name != 'pull_request_target'))))) steps: - name: GitHub Requires at Least One Step for a Job run: exit 0 @@ -83,7 +83,7 @@ jobs: dmapi-build: name: Build DMAPI needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') strategy: fail-fast: false matrix: @@ -167,7 +167,7 @@ jobs: name: Build gh-pages runs-on: ubuntu-latest needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') steps: - name: Setup dotnet uses: actions/setup-dotnet@v2 @@ -238,7 +238,7 @@ jobs: name: Build Docker Image runs-on: ubuntu-latest needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') steps: - name: Checkout (Branch) uses: actions/checkout@v3 @@ -256,7 +256,7 @@ jobs: linux-unit-tests: name: Linux Tests needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') strategy: fail-fast: false matrix: @@ -312,7 +312,7 @@ jobs: windows-unit-tests: name: Windows Tests needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') strategy: fail-fast: false matrix: @@ -362,7 +362,7 @@ jobs: windows-integration-test: name: Windows Live Tests needs: dmapi-build - if: "!(cancelled() || failure()) && needs.dmapi-build.result == 'success'" + if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success') strategy: fail-fast: false matrix: @@ -518,7 +518,7 @@ jobs: linux-integration-tests: name: Linux Live Tests needs: dmapi-build - if: "!(cancelled() || failure()) && needs.dmapi-build.result == 'success'" + if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success') services: # We start all dbs here so we can just code the stuff once mssql: image: mcr.microsoft.com/mssql/server:2019-latest @@ -684,7 +684,7 @@ jobs: validate-openapi-spec: name: OpenAPI Spec Validation needs: windows-integration-test - if: "!(cancelled() || failure()) && needs.windows-integration-test.result == 'success'" + if: (!(cancelled() || failure()) && needs.windows-integration-test.result == 'success') runs-on: ubuntu-latest steps: - name: Install IBM OpenAPI Validator @@ -712,7 +712,7 @@ jobs: upload-code-coverage: name: Upload Code Coverage needs: [linux-unit-tests, linux-integration-tests, windows-unit-tests, windows-integration-test] - if: "!(cancelled() || failure()) && needs.linux-unit-tests.result == 'success' && needs.linux-integration-tests.result == 'success' && needs.windows-unit-tests.result == 'success' && needs.windows-integration-test.result == 'success'" + if: (!(cancelled() || failure()) && needs.linux-unit-tests.result == 'success' && needs.linux-integration-tests.result == 'success' && needs.windows-unit-tests.result == 'success' && needs.windows-integration-test.result == 'success') runs-on: ubuntu-latest steps: - name: Checkout (Branch) @@ -969,7 +969,7 @@ jobs: name: Build .deb Package # Can't do i386 due to https://github.com/dotnet/core/issues/4595 needs: start-ci-run-gate runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') steps: - name: Install Native Dependencies run: | @@ -978,7 +978,7 @@ jobs: sudo apt-get install -y -o APT::Immediate-Configure=0 libstdc++6:i386 libgcc-s1:i386 gnupg2 xmlstarlet - name: Import GPG Key - if: "github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')" + if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')) run: | echo "${{ secrets.PACKAGING_PRIVATE_KEY }}" > private.pgp echo ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }} | gpg --batch --yes --passphrase-fd 0 --import private.pgp @@ -1016,11 +1016,11 @@ jobs: echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV - name: Execute Build Script (Unsigned) - if: "!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))" + if: (!(github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev'))) run: sudo build/package/deb/build_package.sh - name: Execute Build Script (Signed) - if: "github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')" + if: (github.event_name == 'push' && contains(github.event.head_commit.message, '[TGSDeploy]') && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')) env: PACKAGING_KEYGRIP: ${{ vars.PACKAGING_KEYGRIP }} run: | @@ -1068,7 +1068,7 @@ jobs: name: Build Windows Installer .exe needs: start-ci-run-gate runs-on: windows-latest - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') steps: - name: Install winget uses: Cyberboss/install-winget@v1 @@ -1197,7 +1197,7 @@ jobs: check-winget-pr-template: name: Check winget-pkgs Pull Request Template is up to date needs: start-ci-run-gate - if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'" + if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') runs-on: ubuntu-latest steps: - name: Setup dotnet @@ -1236,7 +1236,7 @@ jobs: name: CI Completion Gate needs: [ pages-build, docker-build, build-deb, build-msi, validate-openapi-spec, upload-code-coverage, check-winget-pr-template ] runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success'" + if: (!(cancelled() || failure()) && needs.pages-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.build-msi.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && needs.check-winget-pr-template.result == 'success') steps: - name: GitHub Requires at Least One Step for a Job run: exit 0 @@ -1245,7 +1245,7 @@ jobs: name: Deployment Start Gate needs: ci-completion-gate runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && needs.ci-completion-gate.result == 'success' && github.event_name == 'push' && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')" + if: (!(cancelled() || failure()) && needs.ci-completion-gate.result == 'success' && github.event_name == 'push' && (github.event.ref == 'refs/heads/master' || github.event.ref == 'refs/heads/dev')) steps: - name: GitHub Requires at Least One Step for a Job run: exit 0 @@ -1254,7 +1254,7 @@ jobs: name: Deploy HTTP API needs: deployment-gate runs-on: windows-latest - if: "!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')" + if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')) steps: - name: Checkout uses: actions/checkout@v3 @@ -1297,7 +1297,7 @@ jobs: name: Deploy DreamMaker API needs: deployment-gate runs-on: windows-latest - if: "!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')" + if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')) steps: - name: Checkout uses: actions/checkout@v3 @@ -1339,7 +1339,7 @@ jobs: name: Deploy Nuget Packages needs: deployment-gate runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')" + if: (!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')) steps: - name: Setup dotnet uses: actions/setup-dotnet@v2 @@ -1377,7 +1377,7 @@ jobs: name: Ensure TGS Release is Latest GitHub Release needs: [deploy-dm, deploy-http] runs-on: ubuntu-latest - if: "!(cancelled() || failure()) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')" + if: (!(cancelled() || failure()) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')) steps: - name: Setup dotnet uses: actions/setup-dotnet@v2 @@ -1402,7 +1402,7 @@ jobs: name: Deploy TGS needs: [deploy-dm, deploy-http, deployment-gate] runs-on: windows-latest - if: "!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')" + if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')) steps: - name: Setup dotnet uses: actions/setup-dotnet@v2 @@ -1594,7 +1594,7 @@ jobs: deploy-docker: name: Deploy TGS (Docker) needs: deploy-tgs - if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'" + if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') runs-on: ubuntu-latest steps: - name: Checkout @@ -1618,7 +1618,7 @@ jobs: deploy-ppa: name: Deploy TGS (PPA) needs: deploy-tgs - if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'" + if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') runs-on: ubuntu-latest steps: - name: Checkout @@ -1637,7 +1637,7 @@ jobs: deploy-winget: name: Deploy TGS (winget) needs: deploy-tgs - if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'" + if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') runs-on: windows-latest steps: - name: Setup dotnet diff --git a/build/Version.props b/build/Version.props index 49a571b3de..9de608f61d 100644 --- a/build/Version.props +++ b/build/Version.props @@ -5,9 +5,9 @@ 5.14.0 4.7.1 - 9.11.1 + 9.12.0 6.0.0 - 11.0.1 + 11.1.0 12.0.1 6.5.2 5.6.1 diff --git a/src/Tgstation.Server.Api/Models/DiscordConnectionStringBuilder.cs b/src/Tgstation.Server.Api/Models/DiscordConnectionStringBuilder.cs index c51d74a49f..2f954d4e80 100644 --- a/src/Tgstation.Server.Api/Models/DiscordConnectionStringBuilder.cs +++ b/src/Tgstation.Server.Api/Models/DiscordConnectionStringBuilder.cs @@ -22,6 +22,7 @@ namespace Tgstation.Server.Api.Models /// /// to enable based mode. Will auto reply with a youtube link to a video that says "based on the hardware that's installed in it" to anyone saying 'based on what?' case-insensitive. /// + [Obsolete("Will be removed in next major TGS version")] public bool BasedMeme { get; set; } /// @@ -39,7 +40,6 @@ namespace Tgstation.Server.Api.Models /// public DiscordConnectionStringBuilder() { - BasedMeme = true; } /// @@ -60,9 +60,10 @@ namespace Tgstation.Server.Api.Models DMOutputDisplay = dMOutputDisplayType; if (splits.Length > 2 && Int32.TryParse(splits[2], out Int32 basedMeme)) +#pragma warning disable CS0618 // Type or member is obsolete BasedMeme = Convert.ToBoolean(basedMeme); else - BasedMeme = true; // oranges said this needs to be true by default :pensive: + BasedMeme = false; // oranges said this needs to be true by default :pensive: if (splits.Length > 3 && Int32.TryParse(splits[3], out Int32 branding)) DeploymentBranding = Convert.ToBoolean(branding); @@ -72,5 +73,6 @@ namespace Tgstation.Server.Api.Models /// public override string ToString() => $"{BotToken};{(int)DMOutputDisplay};{Convert.ToInt32(BasedMeme)};{Convert.ToInt32(DeploymentBranding)}"; +#pragma warning restore CS0618 // Type or member is obsolete } } diff --git a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs index 142513c275..3ef92357d8 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs @@ -199,7 +199,9 @@ namespace Tgstation.Server.Host.Components.Chat.Providers var csb = new DiscordConnectionStringBuilder(chatBot.ConnectionString); var botToken = csb.BotToken; +#pragma warning disable CS0618 // Type or member is obsolete basedMeme = csb.BasedMeme; +#pragma warning restore CS0618 // Type or member is obsolete outputDisplayType = csb.DMOutputDisplay; deploymentBranding = csb.DeploymentBranding; diff --git a/tests/Tgstation.Server.Tests/Live/Instance/ChatTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/ChatTest.cs index f90c1dc116..02faa835ca 100644 --- a/tests/Tgstation.Server.Tests/Live/Instance/ChatTest.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/ChatTest.cs @@ -149,7 +149,6 @@ namespace Tgstation.Server.Tests.Live.Instance // needs to just be valid connectionString = new DiscordConnectionStringBuilder { - BasedMeme = true, BotToken = "some_token", DeploymentBranding = true, DMOutputDisplay = DiscordDMOutputDisplayType.Never, diff --git a/tests/Tgstation.Server.Tests/Live/Instance/InstanceTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/InstanceTest.cs index 3035e45de9..9265e0e7f6 100644 --- a/tests/Tgstation.Server.Tests/Live/Instance/InstanceTest.cs +++ b/tests/Tgstation.Server.Tests/Live/Instance/InstanceTest.cs @@ -97,7 +97,6 @@ namespace Tgstation.Server.Tests.Live.Instance // needs to just be valid connectionString = new DiscordConnectionStringBuilder { - BasedMeme = true, BotToken = "some_token", DeploymentBranding = true, DMOutputDisplay = DiscordDMOutputDisplayType.Always, diff --git a/tools/Tgstation.Server.Migrator.Comms/Program.cs b/tools/Tgstation.Server.Migrator.Comms/Program.cs index 2e069acb46..2277b9d76f 100644 --- a/tools/Tgstation.Server.Migrator.Comms/Program.cs +++ b/tools/Tgstation.Server.Migrator.Comms/Program.cs @@ -168,7 +168,6 @@ static class Program var discordSetupInfo = new DiscordSetupInfo(providerInfo); csb = new DiscordConnectionStringBuilder { - BasedMeme = false, DMOutputDisplay = DiscordDMOutputDisplayType.Always, BotToken = discordSetupInfo.BotToken };