From ba87b805838b481072c3b3a5b1d76e2ff573ec75 Mon Sep 17 00:00:00 2001 From: Charlie Poole Date: Tue, 8 Oct 2024 06:45:23 -0700 Subject: [PATCH] Fix logic for when ddraft release is created --- recipe/publishing.cake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/recipe/publishing.cake b/recipe/publishing.cake index 2981bd3..6ece7ef 100644 --- a/recipe/publishing.cake +++ b/recipe/publishing.cake @@ -116,16 +116,17 @@ public static class PackageReleaseManager private const string DRAFT_RELEASE_ERROR = "A direct call to CreateDraftRelease is permitted only:\r\n" + - " * On a release branch (release-x.x.x)\r\n" + - " * On the main branch tagged for a production release\r\n" + + " * On a release branch (release-x.x.x) OR\r\n" + " * Using option --packageVersion to specify a release version"; public static void CreateDraftRelease() { string releaseVersion = - CommandLineOptions.PackageVersion.Exists ? CommandLineOptions.PackageVersion.Value : - BuildSettings.IsReleaseBranch ? BuildSettings.BuildVersion.BranchName.Substring(8) : - BuildSettings.IsProductionRelease ? BuildSettings.PackageVersion : null; + CommandLineOptions.PackageVersion.Exists + ? CommandLineOptions.PackageVersion.Value + : BuildSettings.IsReleaseBranch + ? BuildSettings.BuildVersion.BranchName.Substring(8) + : null; if (releaseVersion != null) {