From 4c05a6095e8ee00b8c0b3934b31cfdd2dd9a0a02 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Thu, 28 Nov 2024 21:34:56 +0100 Subject: [PATCH] GitHubSync update --- deployment/cake/lib-signing.cake | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/deployment/cake/lib-signing.cake b/deployment/cake/lib-signing.cake index 0c3bef6..5ce96ea 100644 --- a/deployment/cake/lib-signing.cake +++ b/deployment/cake/lib-signing.cake @@ -49,7 +49,13 @@ public static void SignFilesInDirectory(BuildContext buildContext, string direct var codeSignContext = buildContext.General.CodeSign; var azureCodeSignContext = buildContext.General.AzureCodeSign; - var certificateSubjectName = buildContext.General.CodeSign.CertificateSubjectName; + if (buildContext.General.IsLocalBuild || + buildContext.General.IsCiBuild) + { + // Never code-sign local or ci builds + return; + } + if (!codeSignContext.IsAvailable && !azureCodeSignContext.IsAvailable) { @@ -259,6 +265,13 @@ public static void SignNuGetPackage(BuildContext buildContext, string fileName) return; } + if (!codeSignContext.IsAvailable && + !azureCodeSignContext.IsAvailable) + { + buildContext.CakeContext.Information("Skipping code signing because none of the options is available"); + return; + } + buildContext.CakeContext.Information($"Signing NuGet package '{fileName}'"); if (azureCodeSignContext.IsAvailable)