Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Build.PublicApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ partial class Build
Target GeneratePublicApi => _ => _
.Executes(() =>
{
var types = typeof(NukeBuild).Assembly
var types = typeof(FalloutBuild).Assembly
.GetTypes()
.SelectMany(x => x.DescendantsAndSelf(y => y.GetNestedTypes()))
.Where(x => x.IsPublic || x.IsNestedPublic)
Expand Down
2 changes: 1 addition & 1 deletion build/Build.Terminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public DisableDefaultOutputAttribute(params DefaultOutput[] disabledOutputs)
{
}

public override bool IsApplicable(INukeBuild build) => build.Host is T;
public override bool IsApplicable(IFalloutBuild build) => build.Host is T;
}
4 changes: 2 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
[DotNetVerbosityMapping]
[ShutdownDotNetAfterServerBuild]
partial class Build
: NukeBuild,
: FalloutBuild,
IHazChangelog,
IHazGitRepository,
IHazGitVersion,
Expand Down Expand Up @@ -257,6 +257,6 @@ IEnumerable<AbsolutePath> NuGetPackageFiles
});

T From<T>()
where T : INukeBuild
where T : IFalloutBuild
=> (T)(object)this;
}
22 changes: 11 additions & 11 deletions docs/02-fundamentals/04-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
title: Build Anatomy
---

A build project is a regular .NET console application. However, unlike regular console applications, NUKE chooses to name the main class `Build` instead of `Program`. This establishes a convention and allows easier navigation in your solution. The `Build` class must inherit from the `NukeBuild` base class and define a `Main` method to invoke the build execution and define any number of default targets:
A build project is a regular .NET console application. However, unlike regular console applications, NUKE chooses to name the main class `Build` instead of `Program`. This establishes a convention and allows easier navigation in your solution. The `Build` class must inherit from the `FalloutBuild` base class and define a `Main` method to invoke the build execution and define any number of default targets:

<Tabs>
<TabItem value="single" label="Single Default&nbsp;Target">

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
public static int Main() => Execute<Build>(x => x.Compile);

Expand All @@ -20,7 +20,7 @@ class Build : NukeBuild
<TabItem value="multiple" label="Multiple Default&nbsp;Targets">

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
public static int Main() => Execute<Build>(x => x.Test, x => x.Pack);

Expand All @@ -32,7 +32,7 @@ class Build : NukeBuild
<TabItem value="none" label="No Default&nbsp;Target">

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
public static int Main() => Execute<Build>();

Expand All @@ -49,14 +49,14 @@ You will learn how to [write target definitions](05-targets.md) in the next chap

## Base Properties

The `NukeBuild` base class offers great insight into your build through various properties.
The `FalloutBuild` base class offers great insight into your build through various properties.

### Build Environment

Properties related to the build environment provide information about where the build is running and where various files are located:

```csharp title="NukeBuild.cs"
abstract class NukeBuild
```csharp title="FalloutBuild.cs"
abstract class FalloutBuild
{
static Host Host { get; }
static bool IsLocalBuild { get; }
Expand Down Expand Up @@ -88,8 +88,8 @@ Learn more about the `AbsolutePath` class and how it's used for [path constructi

Properties related to the build status allow you to examine the status of your targets and the overall build:

```csharp title="NukeBuild.cs"
abstract class NukeBuild
```csharp title="FalloutBuild.cs"
abstract class FalloutBuild
{
IReadOnlyCollection<ExecutableTarget> InvokedTargets { get; }
IReadOnlyCollection<ExecutableTarget> SkippedTargets { get; }
Expand Down Expand Up @@ -118,8 +118,8 @@ You can examine the status of targets by using any of the appropriate `ICollecti

For implementing cross-cutting concerns, like telemetry and similar, you can hook into various build events:

```csharp title="NukeBuild.cs"
abstract class NukeBuild
```csharp title="FalloutBuild.cs"
abstract class FalloutBuild
{
virtual void OnBuildCreated();
virtual void OnBuildInitialized();
Expand Down
26 changes: 13 additions & 13 deletions docs/02-fundamentals/05-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Inside a `Build` class, you can define your build steps as `Target` properties.
<TabItem value="regular" label="Regular Targets">

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
public static int Main() => Execute<Build>();

Expand All @@ -25,7 +25,7 @@ class Build : NukeBuild
<TabItem value="async" label="Async Targets">

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
public static int Main() => Execute<Build>();

Expand Down Expand Up @@ -56,7 +56,7 @@ Specifying dependencies is essential to let targets run in a meaningful and pred
Define that target `A` must run before target `B` unless `A` is skipped:

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand All @@ -80,7 +80,7 @@ class Build : NukeBuild
Define that target `A` runs before target `B` if both are scheduled:

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand All @@ -105,7 +105,7 @@ Define that target `A` invokes target `B` once it completes:


```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand Down Expand Up @@ -139,7 +139,7 @@ Dependencies between targets are ONLY defined between the individual targets and
The execution is nondeterministic between `A->B->C` and `B->A->C`. This isn't necessarily problematic, but something to be aware of. In particular, it allows different targets to run in parallel (currently only in compatible CI/CD environments).

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
.Executes(() => { });
Expand All @@ -161,7 +161,7 @@ class Build : NukeBuild
The execution is always deterministic with `A->B->C`.

```csharp title="Build.cs"
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
.Executes(() => { });
Expand Down Expand Up @@ -195,7 +195,7 @@ Apart from [skipping targets manually](../01-getting-started/03-execution.md#ski
Define a condition that is checked right before target `B` executes:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
readonly List<string> Data = new();

Expand All @@ -217,7 +217,7 @@ class Build : NukeBuild
Define a condition that is checked before target `A` and `B` execute:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
.Executes(() => { });
Expand Down Expand Up @@ -245,7 +245,7 @@ When a condition is not met, the skip reason is created from the boolean express
You can define target requirements that are checked right at the beginning of the build execution before any other targets are executed:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand Down Expand Up @@ -273,7 +273,7 @@ Not every failing target should completely stop the build. Targets that are not
Define that execution continues after target `A` throws:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand All @@ -296,7 +296,7 @@ class Build : NukeBuild
Define that target `B` executes even if another target fails:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
.Executes(() =>
Expand All @@ -321,7 +321,7 @@ class Build : NukeBuild
It is good practice to follow the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) when implementing targets. However, you may not want to expose every target through the [build help text](../01-getting-started/03-execution.md#help-text). For cases like this, you can un-list a target:

```csharp
class Build : NukeBuild
class Build : FalloutBuild
{
Target A => _ => _
// highlight-start
Expand Down
2 changes: 1 addition & 1 deletion docs/03-common/03-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Constructing Paths

Referencing files and directories seems like a trivial task. Nevertheless, developers often run into problems where relative paths no longer match the current working directory, or find themselves fixing path separator issues that stem from [historical design decisions](https://www.youtube.com/watch?v=5T3IJfBfBmI). NUKE follows the approach to use absolute paths whenever possible, which ensures explicitness and allows copying [tool invocations](08-cli-tools.md) from the log and executing them from anywhere you are.

Central to the idea of absolute paths is the `AbsolutePath` type and the `NukeBuild.RootDirectory` property. From there on, you can easily construct paths through the [overloaded division operator](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/operator-overloading):
Central to the idea of absolute paths is the `AbsolutePath` type and the `FalloutBuild.RootDirectory` property. From there on, you can easily construct paths through the [overloaded division operator](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/operator-overloading):

<!-- snippet: path-construction-basic -->
```cs
Expand Down
2 changes: 1 addition & 1 deletion docs/03-common/05-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ For certain operations, you may initialize an **authorized client**:
// Set credentials for authorized actions
var credentials = new Credentials(GitHubActions.Instance.Token);
GitHubTasks.GitHubClient = new GitHubClient(
new ProductHeaderValue(nameof(NukeBuild)),
new ProductHeaderValue(nameof(FalloutBuild)),
new InMemoryCredentialStore(credentials));

// Create and close a milestone
Expand Down
2 changes: 1 addition & 1 deletion docs/03-common/08-cli-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Using the `VerbosityMappingAttribute`, it is possible to automatically map the v
Minimal = nameof(MSBuildVerbosity.Minimal),
Normal = nameof(MSBuildVerbosity.Normal),
Verbose = nameof(MSBuildVerbosity.Detailed))]
class Build : NukeBuild
class Build : FalloutBuild
{
// ...
}
Expand Down
Loading
Loading