From 80a6e5d81635d399f396078c8893669f96a4f884 Mon Sep 17 00:00:00 2001 From: Adam Renaud Date: Wed, 17 Mar 2021 20:23:48 -0400 Subject: [PATCH] updating build to main from master --- build/Build.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/Build.cs b/build/Build.cs index f171108..3481bd7 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -9,6 +9,7 @@ using Nuke.Common.Tools.Coverlet; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; +using Nuke.Common.Utilities; using Nuke.Common.Utilities.Collections; using static Nuke.Common.IO.FileSystemTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks; @@ -103,12 +104,16 @@ class Build : NukeBuild .SetSource("https://nuget.pkg.github.com/rena0157/index.json") .SetApiKey(GitHubToken)); } - else if (GitRepository.IsOnMasterBranch()) + else if (GitRepository.Branch?.EqualsOrdinalIgnoreCase("main") ?? false) { DotNetNuGetPush(p => p .SetTargetPath(OutputDirectory / "*.nupkg") .SetSource("https://api.nuget.org/v3/index.json") .SetApiKey(NugetApiKey)); } + else + { + Logger.Log(LogLevel.Normal, "No packages where released"); + } }); } \ No newline at end of file