Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/AutomationUtils/BuildCommand.cs
Peter Sauerbrei dc1d815f84 refactored the logging system for UAT/UBT to be more like UE4
we now use an enum similar to UE4 with Fatal, Error, Warning, Display, Log, Verbose, and VeryVerbose
Log will only go to the log file unless -verbose is passed on the command line
reduced some of the output from UAT to be Log only

[CL 2631062 by Peter Sauerbrei in Main branch]
2015-07-23 14:51:46 -04:00

55 lines
1.0 KiB
C#

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutomationTool;
/// <summary>
/// Base class for buildcommands.
/// </summary>
public abstract class BuildCommand : CommandUtils
{
#region Interface
/// <summary>
/// Build command entry point. Throws AutomationExceptions on failure.
/// </summary>
public abstract void ExecuteBuild();
#endregion
/// <summary>
/// Command entry point.
/// </summary>
public void Execute()
{
try
{
ExecuteBuild();
}
catch
{
LogError("BUILD FAILED");
throw;
}
LogConsole("BUILD SUCCESSFUL");
}
/// <summary>
/// Executes a new command as a child of another command.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="ParentCommand"></param>
public static void Execute<T>(BuildCommand ParentCommand) where T : BuildCommand, new()
{
T Command = new T();
if (ParentCommand != null)
{
Command.Params = ParentCommand.Params;
}
Command.Execute();
}
}