// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/ObjectMacros.h" #include "Commandlets/Commandlet.h" #include "ContentValidationCommandlet.generated.h" class IAssetRegistry; 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& ChangedPackageNames, const TArray& DeletedPackageNames, const TArray& ChangedCode, const TArray& 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& OutChangedPackageNames, TArray& DeletedPackageNames, TArray& OutChangedCode, TArray& OutChangedOtherFiles) const; void GetAllPackagesInPath(IAssetRegistry& AssetRegistry, const FString& InPathString, TArray& OutPackageNames) const; void GetAllPackagesOfType(const FString& OfTypeString, TArray& OutPackageNames) const; bool LaunchP4(const FString& Args, TArray& Output, int32& OutReturnCode) const; FString GetLocalPathFromDepotPath(const FString& DepotPathName) const; };