Nuke.Unreal
Build Unreal apps in Style.
Loading...
Searching...
No Matches
UnrealBuildTest.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Threading.Tasks;
5using Nuke.Common.Tools.Git;
6using Serilog;
7
8namespace Nuke.Unreal;
9
10/// <summary>
11/// Used only for testing purposes. It has no external use outside of Nuke.Unreal development.
12/// </summary>
14{
15 protected override void OnBuildCreated()
16 {
17 base.OnBuildCreated();
18 NoLogo = true;
19 }
20
21 protected virtual void Cleanup()
22 {
23 GitTasks.Git("clean -xdf -e Nuke.Targets/ -e .nuke/", workingDirectory: ProjectFolder);
24 GitTasks.Git("restore . -- :(exclude)Nuke.Targets/ :(exclude).nuke/", workingDirectory: ProjectFolder);
25 }
26
27 protected virtual void PostBuildCheck() {}
28
29 protected override void OnBuildFinished()
30 {
31 try
32 {
33 PostBuildCheck();
34 }
35 catch (Exception e)
36 {
37 Log.Error(e, "Post build check failed");
38 ExitCode = -1;
39 }
40 Cleanup();
41 }
42}
Used only for testing purposes. It has no external use outside of Nuke.Unreal development.
The main build class Unreal projects using Nuke.Unreal should inherit from. This class contains all b...
AbsolutePath ProjectFolder
Path to folder containing the .project file.