RealtimeStyleTransferRuntime/Source/LyraEditor/Commandlets/ContentValidationCommandlet.h

40 lines
1.6 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Commandlets/Commandlet.h"
2022-09-13 07:18:28 +00:00
#include "Containers/Array.h"
#include "Containers/UnrealString.h"
#include "HAL/Platform.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "ContentValidationCommandlet.generated.h"
class IAssetRegistry;
2022-09-13 07:18:28 +00:00
class UObject;
2022-05-23 18:41:30 +00:00
UCLASS()
class UContentValidationCommandlet : public UCommandlet
{
GENERATED_UCLASS_BODY()
public:
// Begin UCommandlet Interface
virtual int32 Main(const FString& Params) override;
// End UCommandlet Interface
private:
/** Validate steps */
bool AutoExportMCPTemplates(const TArray<FString>& ChangedPackageNames, const TArray<FString>& DeletedPackageNames, const TArray<FString>& ChangedCode, const TArray<FString>& ChangedOtherFiles, const FString& SyncedCL, const FString& Robomerge, bool& bOutDidExport);
bool AutoExportDadContent(const FString& BuildCL, const FString& AccessToken);
bool AutoPersistDadContent(const FString& AccessToken);
private:
/** Helper functions */
bool GetAllChangedFiles(IAssetRegistry& AssetRegistry, const FString& P4CmdString, TArray<FString>& OutChangedPackageNames, TArray<FString>& DeletedPackageNames, TArray<FString>& OutChangedCode, TArray<FString>& OutChangedOtherFiles) const;
void GetAllPackagesInPath(IAssetRegistry& AssetRegistry, const FString& InPathString, TArray<FString>& OutPackageNames) const;
void GetAllPackagesOfType(const FString& OfTypeString, TArray<FString>& OutPackageNames) const;
bool LaunchP4(const FString& Args, TArray<FString>& Output, int32& OutReturnCode) const;
FString GetLocalPathFromDepotPath(const FString& DepotPathName) const;
};