Files
UnrealEngineUWP/Engine/Source/Programs/AutomationTool/Scripts/GetFileCommand.Automation.cs
PJ Kack 6b6bc48fc5 UAT: Add additional startup and BuildCookRun logging and timings
#jira none
#rb trivial
#rnx
#preflight 627379dda56dd762120e6e2e

[CL 20055418 by PJ Kack in ue5-main branch]
2022-05-05 03:40:01 -04:00

43 lines
1.1 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Reflection;
using AutomationTool;
using UnrealBuildTool;
using EpicGames.Core;
namespace AutomationScripts
{
public partial class Project : CommandUtils
{
public static void GetFile(ProjectParams Params)
{
Params.ValidateAndLog();
if (string.IsNullOrEmpty(Params.GetFile))
{
return;
}
LogInformation("********** GETFILE COMMAND STARTED **********");
var StartTime = DateTime.UtcNow;
var FileName = Path.GetFileName(Params.GetFile);
var LocalFile = CombinePaths(CmdEnv.EngineSavedFolder, FileName);
var SC = CreateDeploymentContext(Params, false);
if (SC.Count == 0)
{
throw new AutomationException("Failed to create deployment context");
}
SC[0].StageTargetPlatform.GetTargetFile(Params.GetFile, LocalFile, Params);
LogInformation("GetFile command time: {0:0.00} s", (DateTime.UtcNow - StartTime).TotalMilliseconds / 1000);
LogInformation("********** GETFILE COMMAND COMPLETED **********");
}
}
}