diff --git a/Build/.nuke/build.schema.json b/Build/.nuke/build.schema.json index 9454c2f..131f82f 100644 --- a/Build/.nuke/build.schema.json +++ b/Build/.nuke/build.schema.json @@ -127,11 +127,11 @@ "Name": { "type": "string" }, - "NugetApiKey": { + "NuGetApiKey": { "type": "string", "default": "Secrets must be entered via 'nuke :secrets [profile]'" }, - "NugetApiUrl": { + "NuGetApiUrl": { "type": "string", "default": "Secrets must be entered via 'nuke :secrets [profile]'" }, @@ -168,7 +168,7 @@ "TestResults": { "type": "boolean" }, - "UnlistNuget": { + "UnlistNuGet": { "type": "boolean" } } diff --git a/Build/Build.cs b/Build/Build.cs index 76c5658..59f3a77 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -7,7 +7,7 @@ class Build : NukeBuild, IPublishPack, ICompileExample, ITest, IShowGitVersion, { public void ReleaseAsset(ReleaseAssets releaseAssets) { } IAssetRelease IHazAssetRelease.AssetRelease => new AssetRelease(); - //bool IPack.UnlistNuget => true; + //bool IPack.UnlistNuGet => true; bool ITest.TestBuildStopWhenFailed => false; public static int Main() => Execute(x => x.From().Build); } diff --git a/Build/ILocalAssetRelease.cs b/Build/ILocalAssetRelease.cs index 197fcc6..2be931b 100644 --- a/Build/ILocalAssetRelease.cs +++ b/Build/ILocalAssetRelease.cs @@ -6,7 +6,7 @@ class AssetRelease : IAssetRelease { public void ReleaseAsset(ReleaseAssets releaseAssets) { - Serilog.Log.Information($"Project: {releaseAssets.Project.Name}"); + Serilog.Log.Information($"Project: {releaseAssets.Project?.Name}"); Serilog.Log.Information($"Version: {releaseAssets.Version}"); Serilog.Log.Information($"Notes: {releaseAssets.Notes}"); Serilog.Log.Information($"Prerelease: {releaseAssets.Prerelease}"); diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bc1613..515c555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.9.3] / 2025-03-20 +### Updated +- Update `MainProject` to exception and message when null. + ## [1.9.2] / 2025-01-19 ### Updated - Add `NuGetTasks` delete, sign and verify. @@ -400,6 +404,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - First Release [vNext]: ../../compare/1.0.0...HEAD +[1.9.3]: ../../compare/1.9.2...1.9.3 [1.9.2]: ../../compare/1.9.1...1.9.2 [1.9.1]: ../../compare/1.9.0...1.9.1 [1.9.0]: ../../compare/1.8.2...1.9.0 diff --git a/Directory.Build.props b/Directory.Build.props index 33dd450..dc03046 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 1.9.2 + 1.9.3 \ No newline at end of file diff --git a/ricaun.Nuke/Components/IHazMainProject.cs b/ricaun.Nuke/Components/IHazMainProject.cs index f79b9a9..3d051b2 100644 --- a/ricaun.Nuke/Components/IHazMainProject.cs +++ b/ricaun.Nuke/Components/IHazMainProject.cs @@ -18,7 +18,7 @@ public interface IHazMainProject : IHazSolution, INukeBuild /// /// MainProject (default: ) /// - public Project MainProject => Solution.GetOtherProject(MainName); + public Project MainProject => Solution.GetOtherProject(MainName) ?? throw new System.Exception($"{nameof(MainProject)} is null using '{MainName}', use 'string {nameof(IHazMainProject)}.{nameof(MainName)} => \"YourMainProjectName\"'."); /// /// MainProject (default: )