Merge pull request #8415 from deniz1a/make-utility-check

Adds checks for OpenRA.Utility.exe in make.cmd.
This commit is contained in:
abcdefg30
2015-06-13 15:27:40 +02:00

View File

@@ -18,6 +18,11 @@ function FindMSBuild
return $null
}
function UtilityNotFound
{
echo "OpenRA.Utility.exe could not be found. Build the project first using the `"all`" command."
}
if ($args.Length -eq 0)
{
echo "Command list:"
@@ -74,7 +79,7 @@ elseif ($command -eq "clean")
rm *.dll
rm *.config
rm mods/*/*.dll
if (Test-Path -Path thirdparty/download/)
if (Test-Path thirdparty/download/)
{
rmdir thirdparty/download -Recurse -Force
}
@@ -130,6 +135,8 @@ elseif ($command -eq "dependencies")
}
elseif ($command -eq "test")
{
if (Test-Path OpenRA.Utility.exe)
{
echo "Testing mods..."
echo "Testing Red Alert mod MiniYAML..."
./OpenRA.Utility.exe ra --check-yaml
@@ -139,9 +146,16 @@ elseif ($command -eq "test")
./OpenRA.Utility.exe d2k --check-yaml
echo "Testing Tiberian Sun mod MiniYAML..."
./OpenRA.Utility.exe ts --check-yaml
}
else
{
UtilityNotFound
}
}
elseif ($command -eq "check")
{
if (Test-Path OpenRA.Utility.exe)
{
echo "Checking for code style violations in OpenRA.Renderer.Null..."
./OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Null
echo "Checking for code style violations in OpenRA.GameMonitor..."
@@ -166,12 +180,24 @@ elseif ($command -eq "check")
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Utility
echo "Checking for code style violations in OpenRA.Test..."
./OpenRA.Utility.exe cnc --check-code-style OpenRA.Test
}
else
{
UtilityNotFound
}
}
elseif ($command -eq "docs")
{
if (Test-Path OpenRA.Utility.exe)
{
./make.ps1 version
./OpenRA.Utility.exe all --docs | Out-File -Encoding "UTF8" DOCUMENTATION.md
./OpenRA.Utility.exe ra --lua-docs | Out-File -Encoding "UTF8" Lua-API.md
}
else
{
UtilityNotFound
}
}
else
{