diff --git a/Scripts/bat/!README.txt b/Scripts/bat/!README.txt new file mode 100644 index 0000000000..53d5c214f5 --- /dev/null +++ b/Scripts/bat/!README.txt @@ -0,0 +1,21 @@ +buildAllDebug + Builds all projects with debug configuration +buildAllRelease + Builds all projects with release configuration + +The debug vs release build is simply what people develop in vs the actual server. +The release build contains various optimizations, while the debug build contains debugging tools. +If you're mapping, use the release build as it will run smoother with less crashes. + + +runQuickAll + Runs the client and server without building +runQuickClient + Runs the client without building +runQuickServer + Runs the server without building + +runTestsIntegration + Runs the integration tests, makes sure various C# systems work as intended +runTestsYAML + Runs the YAML linter and finds issues with the YAML files that you probably wouldn't otherwise diff --git a/Scripts/bat/buildAllDebug.bat b/Scripts/bat/buildAllDebug.bat new file mode 100644 index 0000000000..17415a48a0 --- /dev/null +++ b/Scripts/bat/buildAllDebug.bat @@ -0,0 +1,6 @@ +@echo off +cd ../../ +call python RUN_THIS.py +call git submodule update --init --recursive +call dotnet build -c Debug +pause diff --git a/Scripts/bat/buildAllRelease.bat b/Scripts/bat/buildAllRelease.bat new file mode 100644 index 0000000000..485492ed06 --- /dev/null +++ b/Scripts/bat/buildAllRelease.bat @@ -0,0 +1,6 @@ +@echo off +cd ../../ +call python RUN_THIS.py +call git submodule update --init --recursive +call dotnet build -c Release +pause diff --git a/Scripts/bat/runQuickAll.bat b/Scripts/bat/runQuickAll.bat new file mode 100644 index 0000000000..c2d3438094 --- /dev/null +++ b/Scripts/bat/runQuickAll.bat @@ -0,0 +1,4 @@ +@echo off +start runQuickServer.bat %* +start runQuickClient.bat %* +exit diff --git a/Scripts/bat/runQuickClient.bat b/Scripts/bat/runQuickClient.bat new file mode 100644 index 0000000000..16e02d0ada --- /dev/null +++ b/Scripts/bat/runQuickClient.bat @@ -0,0 +1,4 @@ +@echo off +cd ../../ +call dotnet run --project Content.Client --no-build %* +pause diff --git a/Scripts/bat/runQuickServer.bat b/Scripts/bat/runQuickServer.bat new file mode 100644 index 0000000000..602d33663a --- /dev/null +++ b/Scripts/bat/runQuickServer.bat @@ -0,0 +1,4 @@ +@echo off +cd ../../ +call dotnet run --project Content.Server --no-build %* +pause diff --git a/Scripts/bat/runTestsIntegration.bat b/Scripts/bat/runTestsIntegration.bat new file mode 100644 index 0000000000..100cbf8348 --- /dev/null +++ b/Scripts/bat/runTestsIntegration.bat @@ -0,0 +1,14 @@ +cd ..\..\ + +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m + +mkdir Scripts\logs + +del Scripts\logs\Content.Tests.log +dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 > Scripts\logs\Content.Tests.log + +del Scripts\logs\Content.IntegrationTests.log +dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts\logs\Content.IntegrationTests.log + +pause diff --git a/Scripts/bat/runTestsYAML.bat b/Scripts/bat/runTestsYAML.bat new file mode 100644 index 0000000000..eaee34aab0 --- /dev/null +++ b/Scripts/bat/runTestsYAML.bat @@ -0,0 +1,10 @@ +cd ..\..\ + +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m + +mkdir Scripts\logs +del Scripts\logs\Content.YAMLLinter.log +dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build -- NUnit.ConsoleOut=0 > Scripts\logs\Content.YAMLLinter.log + +pause diff --git a/Scripts/sh/!README.txt b/Scripts/sh/!README.txt new file mode 100644 index 0000000000..53d5c214f5 --- /dev/null +++ b/Scripts/sh/!README.txt @@ -0,0 +1,21 @@ +buildAllDebug + Builds all projects with debug configuration +buildAllRelease + Builds all projects with release configuration + +The debug vs release build is simply what people develop in vs the actual server. +The release build contains various optimizations, while the debug build contains debugging tools. +If you're mapping, use the release build as it will run smoother with less crashes. + + +runQuickAll + Runs the client and server without building +runQuickClient + Runs the client without building +runQuickServer + Runs the server without building + +runTestsIntegration + Runs the integration tests, makes sure various C# systems work as intended +runTestsYAML + Runs the YAML linter and finds issues with the YAML files that you probably wouldn't otherwise diff --git a/Scripts/sh/buildAllDebug.sh b/Scripts/sh/buildAllDebug.sh new file mode 100644 index 0000000000..9e51c52d95 --- /dev/null +++ b/Scripts/sh/buildAllDebug.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ + +python RUN_THIS.py +git submodule update --init --recursive +dotnet build -c Debug diff --git a/Scripts/sh/buildAllRelease.sh b/Scripts/sh/buildAllRelease.sh new file mode 100644 index 0000000000..d67628d1f1 --- /dev/null +++ b/Scripts/sh/buildAllRelease.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ + +python RUN_THIS.py +git submodule update --init --recursive +dotnet build -c Release diff --git a/Scripts/sh/runQuickAll.sh b/Scripts/sh/runQuickAll.sh new file mode 100644 index 0000000000..49eb5ab8d2 --- /dev/null +++ b/Scripts/sh/runQuickAll.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +sh -e runQuickServer.sh & +sh -e runQuickClient.sh + +exit diff --git a/Scripts/sh/runQuickClient.sh b/Scripts/sh/runQuickClient.sh new file mode 100644 index 0000000000..080c78f27c --- /dev/null +++ b/Scripts/sh/runQuickClient.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ +dotnet run --project Content.Client --no-build diff --git a/Scripts/sh/runQuickServer.sh b/Scripts/sh/runQuickServer.sh new file mode 100644 index 0000000000..b264ff6fc7 --- /dev/null +++ b/Scripts/sh/runQuickServer.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +# make sure to start from script dir +if [ "$(dirname $0)" != "." ]; then + cd "$(dirname $0)" +fi + +cd ../../ +dotnet run --project Content.Server --no-build diff --git a/Scripts/sh/runTestsIntegration.sh b/Scripts/sh/runTestsIntegration.sh new file mode 100644 index 0000000000..327e515300 --- /dev/null +++ b/Scripts/sh/runTestsIntegration.sh @@ -0,0 +1,15 @@ +cd ../../ + +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m + +mkdir Scripts/logs + +rm Scripts/logs/Content.Tests.log +dotnet test --no-build --configuration DebugOpt Content.Tests/Content.Tests.csproj -- NUnit.ConsoleOut=0 > Scripts/logs/Content.Tests.log + +rm Scripts/logs/Content.IntegrationTests.log +dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed > Scripts/logs/Content.IntegrationTests.log + +echo "Tests complete. Press enter to continue." +read diff --git a/Scripts/sh/runTestsYAML.sh b/Scripts/sh/runTestsYAML.sh new file mode 100644 index 0000000000..606540bdde --- /dev/null +++ b/Scripts/sh/runTestsYAML.sh @@ -0,0 +1,11 @@ +cd ../../ + +dotnet restore +dotnet build --configuration DebugOpt --no-restore /p:WarningsAsErrors=nullable /m + +mkdir Scripts/logs +rm Scripts/logs/Content.YAMLLinter.log +dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build -- NUnit.ConsoleOut=0 > Scripts/logs/Content.YAMLLinter.log + +echo "Tests complete. Press enter to continue." +read