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
17 changes: 12 additions & 5 deletions .nuke/build.schema.json → .fallout/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"Quiet"
]
},
"NukeBuild": {
"FalloutBuild": {
"properties": {
"Continue": {
"type": "boolean",
Expand Down Expand Up @@ -112,6 +112,13 @@
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
},
"BuildProjectFile": {
"type": [
"null",
"string"
],
"description": "Path to the build project (.csproj) relative to the repository root. Defaults to 'build/_build.csproj' when unset. Read by the Fallout global tool's in-tool runner."
}
}
}
Expand All @@ -125,11 +132,11 @@
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
],
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)"
},
"GithubToken": {
"type": "string",
Expand All @@ -142,12 +149,12 @@
"SonarToken": {
"type": "string",
"description": "The key to push to sonarcloud",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
"default": "Secrets must be entered via 'fallout :secrets [profile]'"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
"$ref": "#/definitions/FalloutBuild"
}
]
}
1 change: 1 addition & 0 deletions .nuke/parameters.json → .fallout/parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "build.schema.json",
"BuildProjectFile": "Pipeline/Build.csproj",
"Solution": "Mockolate.slnx"
}
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ updates:
commit-message:
prefix: chore
groups:
nuke:
fallout:
patterns:
- "Nuke*"
- "Fallout*"
xunit:
patterns:
- "xunit*"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/Artifacts
/TestResults

# Fallout temporary files
.fallout/temp/

# Temporary files from Sonarqube
.sonarqube/

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ Correctness is a must. The other goals are strong defaults and win in this order
## References

- [Design goals](Docs/agents/design-goals.md): the goals and code rules for every change, the checks before a commit and the goals of this repository.
- [Workflows](Docs/agents/workflows.md): build, test, snapshot, benchmark, mutation, AOT and documentation commands, the Nuke targets in `Pipeline/` and the CI workflows.
- [Workflows](Docs/agents/workflows.md): build, test, snapshot, benchmark, mutation, AOT and documentation commands, the Fallout targets in `Pipeline/` and the CI workflows.
- [Project structure](Docs/agents/project-structure.md): projects, architecture and where code lives.
5 changes: 3 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<PackageVersion Include="System.Memory" Version="4.6.3"/>
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Nuke.Common" Version="10.1.0"/>
<PackageVersion Include="Nuke.Components" Version="10.1.0"/>
<PackageVersion Include="Fallout.Common" Version="10.4.0"/>
<PackageVersion Include="Fallout.Components" Version="10.4.0"/>
<PackageVersion Include="LibGit2Sharp" Version="0.32.0"/>
<PackageVersion Include="SharpCompress" Version="0.50.5"/>
<PackageVersion Include="NuGet.Frameworks" Version="7.9.0"/>
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.163"/>
Expand Down
2 changes: 1 addition & 1 deletion Docs/agents/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| `Source/` | The shipped projects |
| `Tests/` | Test projects and the AOT smoke test app |
| `Benchmarks/` | BenchmarkDotNet comparison with other mocking libraries |
| `Pipeline/` | Nuke build (`Build.csproj`) and the benchmark report generator |
| `Pipeline/` | Fallout build (`Build.csproj`) and the benchmark report generator |
| `Docs/pages/` | User docs published to https://docs.testably.org/Mockolate/ |
| `Docs/agents/` | Guides for contributors and agents (this folder) |
| `.github/` | CI workflows, Dependabot and Mergify configuration |
Expand Down
4 changes: 2 additions & 2 deletions Docs/agents/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Stryker mutates `Source/Mockolate` against `Mockolate.Tests` and `Mockolate.Inte

Reports go to `Artifacts/Stryker`. The `MutationTests` target also prepares the PR comment and expects to run in GitHub Actions.

## Build Pipeline (Nuke)
## Build Pipeline (Fallout)

`Pipeline/Build.csproj` is a Nuke build, started through `build.ps1`, `build.sh` or `build.cmd`. Always name a target: without one, Nuke runs the defaults `ApiChecks`, `Benchmarks` and `CodeAnalysis`. `./build.ps1 --help` lists the targets. The configuration is Debug locally and Release on CI. Every run cleans `Artifacts/` and `TestResults/` first.
`Pipeline/Build.csproj` is a Fallout build, started through `build.ps1`, `build.sh` or `build.cmd`. Always name a target: without one, Fallout runs the defaults `ApiChecks`, `Benchmarks` and `CodeAnalysis`. `./build.ps1 --help` lists the targets. The configuration is Debug locally and Release on CI. Every run cleans `Artifacts/` and `TestResults/` first.

| Target | Purpose |
|---|---|
Expand Down
10 changes: 5 additions & 5 deletions Pipeline/Build.ApiChecks.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Nuke.Common;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using Fallout.Common;
using Fallout.Solutions;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.DotNet;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down
14 changes: 7 additions & 7 deletions Pipeline/Build.Benchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.Git;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.DotNet;
using Fallout.Common.Tools.Git;
using Octokit;
using Serilog;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down Expand Up @@ -101,7 +101,7 @@ partial class Build
Log.Debug("Pull request number: {PullRequestId}", prNumber);
if (int.TryParse(prNumber, out int prId))
{
GitHubClient gitHubClient = new(new ProductHeaderValue("Nuke"));
GitHubClient gitHubClient = new(new ProductHeaderValue("Fallout"));
Credentials tokenAuth = new(GithubToken);
gitHubClient.Credentials = tokenAuth;
IReadOnlyList<IssueComment> comments =
Expand Down
4 changes: 2 additions & 2 deletions Pipeline/Build.CodeAnalysis.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Nuke.Common;
using Nuke.Common.Tools.SonarScanner;
using Fallout.Common;
using Fallout.Common.Tools.SonarScanner;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down
8 changes: 4 additions & 4 deletions Pipeline/Build.CodeCoverage.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Nuke.Common;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.ReportGenerator;
using static Nuke.Common.Tools.ReportGenerator.ReportGeneratorTasks;
using Fallout.Common;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.ReportGenerator;
using static Fallout.Common.Tools.ReportGenerator.ReportGeneratorTasks;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down
14 changes: 7 additions & 7 deletions Pipeline/Build.Compile.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System;
using System.Linq;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Utilities;
using Nuke.Common.Utilities.Collections;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Common.Tools.DotNet;
using Fallout.Common.Tools.GitVersion;
using Fallout.Common.Utilities;
using Fallout.Common.Utilities.Collections;
using Serilog;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down
14 changes: 7 additions & 7 deletions Pipeline/Build.MutationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.DotNet;
using Octokit;
using Serilog;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Fallout.Common.Tools.DotNet.DotNetTasks;
using ProductHeaderValue = Octokit.ProductHeaderValue;
using Project = Nuke.Common.ProjectModel.Project;
using Project = Fallout.Solutions.Project;

// ReSharper disable UnusedMember.Local
// ReSharper disable AllUnderscoreLocalParameterName
Expand Down Expand Up @@ -176,7 +176,7 @@ await client.PutAsync(
string body = File.ReadAllText(ArtifactsDirectory / "PR_Comment.md");
if (int.TryParse(prNumber, out int prId))
{
GitHubClient gitHubClient = new(new ProductHeaderValue("Nuke"));
GitHubClient gitHubClient = new(new ProductHeaderValue("Fallout"));
Credentials tokenAuth = new(GithubToken);
gitHubClient.Credentials = tokenAuth;
IReadOnlyList<IssueComment> comments =
Expand Down
8 changes: 4 additions & 4 deletions Pipeline/Build.Pack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.IO;
using System.Linq;
using System.Text;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Utilities.Collections;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Solutions;
using Fallout.Common.Utilities.Collections;
using static Serilog.Log;

// ReSharper disable AllUnderscoreLocalParameterName
Expand Down
10 changes: 5 additions & 5 deletions Pipeline/Build.UnitTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Linq;
using Nuke.Common;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using Fallout.Common;
using Fallout.Solutions;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.DotNet;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

// ReSharper disable AllUnderscoreLocalParameterName

Expand Down
12 changes: 6 additions & 6 deletions Pipeline/Build.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Nuke.Common;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tools.GitVersion;
using Fallout.Common;
using Fallout.Common.CI.GitHubActions;
using Fallout.Common.IO;
using Fallout.Solutions;
using Fallout.Common.Tools.GitVersion;

namespace Build;

Expand All @@ -12,7 +12,7 @@ namespace Build;
AutoGenerate = false,
ImportSecrets = [nameof(GithubToken),]
)]
partial class Build : NukeBuild
partial class Build : FalloutBuild
{
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

Expand Down
10 changes: 5 additions & 5 deletions Pipeline/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006;CS8632;NU1901;NU1902;NU1903</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<FalloutRootDirectory>..</FalloutRootDirectory>
<FalloutScriptDirectory>..</FalloutScriptDirectory>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
Expand All @@ -21,8 +20,9 @@

<ItemGroup>
<PackageReference Include="LibGit2Sharp"/>
<PackageReference Include="Nuke.Common"/>
<PackageReference Include="Nuke.Components"/>
<PackageReference Include="Fallout.Common"/>
<PackageReference Include="Fallout.Components"/>
<PackageReference Include="NuGet.Frameworks"/>
<PackageReference Include="SharpCompress"/>
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions Pipeline/BuildExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Tools.SonarScanner;
using Fallout.Common.CI.GitHubActions;
using Fallout.Common.Tools.GitVersion;
using Fallout.Common.Tools.SonarScanner;
using Serilog;

namespace Build;
Expand Down
2 changes: 1 addition & 1 deletion Pipeline/Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.ComponentModel;
using Nuke.Common.Tooling;
using Fallout.Common.Tooling;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
Expand Down
2 changes: 1 addition & 1 deletion Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<PropertyGroup>
<!-- The version is only set to support local builds.
In the build pipeline it is overwritten with the actual version in the `nuke Compile` step -->
In the build pipeline it is overwritten with the actual version in the `fallout Compile` step -->
<Version>255.255.255.255</Version>
</PropertyGroup>

Expand Down
7 changes: 1 addition & 6 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
###########################################################################

$BuildProjectFile = "$PSScriptRoot\Pipeline\Build.csproj"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
$TempDirectory = "$PSScriptRoot\\.fallout\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
Expand Down Expand Up @@ -65,10 +65,5 @@ else {

Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
7 changes: 1 addition & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
###########################################################################

BUILD_PROJECT_FILE="$SCRIPT_DIR/Pipeline/Build.csproj"
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
TEMP_DIRECTORY="$SCRIPT_DIR//.fallout/temp"

DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
Expand Down Expand Up @@ -58,10 +58,5 @@ fi

echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
fi

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.300",
"rollForward": "latestMinor"
"rollForward": "latestPatch"
}
}
Loading