Skip to content

Commit c6f6e0d

Browse files
Merge pull request #572 from Catel/GitHubSync/20241128-203453
GitHubSync update
2 parents 2feaa1a + 4c05a60 commit c6f6e0d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

deployment/cake/lib-signing.cake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ public static void SignFilesInDirectory(BuildContext buildContext, string direct
4949
var codeSignContext = buildContext.General.CodeSign;
5050
var azureCodeSignContext = buildContext.General.AzureCodeSign;
5151

52-
var certificateSubjectName = buildContext.General.CodeSign.CertificateSubjectName;
52+
if (buildContext.General.IsLocalBuild ||
53+
buildContext.General.IsCiBuild)
54+
{
55+
// Never code-sign local or ci builds
56+
return;
57+
}
58+
5359
if (!codeSignContext.IsAvailable &&
5460
!azureCodeSignContext.IsAvailable)
5561
{
@@ -259,6 +265,13 @@ public static void SignNuGetPackage(BuildContext buildContext, string fileName)
259265
return;
260266
}
261267

268+
if (!codeSignContext.IsAvailable &&
269+
!azureCodeSignContext.IsAvailable)
270+
{
271+
buildContext.CakeContext.Information("Skipping code signing because none of the options is available");
272+
return;
273+
}
274+
262275
buildContext.CakeContext.Information($"Signing NuGet package '{fileName}'");
263276

264277
if (azureCodeSignContext.IsAvailable)

0 commit comments

Comments
 (0)