Skip to content

Commit

Permalink
Add fancy ReportSummary
Browse files Browse the repository at this point in the history
Heavily inspired from the NUKE build pipeline
  • Loading branch information
IT-VBFK committed Jan 21, 2023
1 parent 1f6238f commit dc8ccb3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Build/Build.cs
Expand Up @@ -13,6 +13,8 @@
using Nuke.Common.Tools.GitVersion;
using Nuke.Common.Tools.ReportGenerator;
using Nuke.Common.Tools.Xunit;
using Nuke.Common.Utilities.Collections;
using Nuke.Components;
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.IO.PathConstruction;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
Expand Down Expand Up @@ -115,6 +117,10 @@ class Build : NukeBuild
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
.Executes(() =>
{
ReportSummary(s => s
.WhenNotNull(GitVersion,(_, o) => _
.AddPair("Version", o.SemVer)));
DotNetBuild(s => s
.SetProjectFile(Solution)
.SetConfiguration(Configuration.CI)
Expand Down Expand Up @@ -258,6 +264,10 @@ class Build : NukeBuild
.OnlyWhenDynamic(() => RunAllTargets || HasSourceChanges)
.Executes(() =>
{
ReportSummary(s => s
.WhenNotNull(SemVer,(_, semVer) => _
.AddPair("Packed version", semVer)));
DotNetPack(s => s
.SetProject(Solution.Core.FluentAssertions)
.SetOutputDirectory(ArtifactsDirectory)
Expand Down
1 change: 1 addition & 0 deletions Build/_build.csproj
Expand Up @@ -24,6 +24,7 @@
<PackageDownload Include="Node.js.redist" Version="[16.17.1]" />
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0182" />
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="Nuke.Components" Version="6.3.0" />
<PackageDownload Include="Yarn.MSBuild" Version="[1.22.19]" />
</ItemGroup>
</Project>

0 comments on commit dc8ccb3

Please sign in to comment.