Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
verify only works if package is notarized
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Jul 4, 2022
1 parent 27d73f0 commit bdcc078
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/Squirrel.CommandLine/OSX/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ private static void Pack(PackOptions options)
HelperExe.Notarize(zipPath, options.notaryProfile);
} else if (SquirrelRuntimeInfo.IsOSX && !String.IsNullOrEmpty(options.signAppIdentity)) {
HelperExe.CodeSign(options.signAppIdentity, options.signEntitlements, appBundlePath);
Log.Warn("Package was signed but will not be notarized. Must supply the --notaryProfile option.");
Log.Warn("Package was signed but will not be notarized or verified. Must supply the --notaryProfile option.");
} else if (SquirrelRuntimeInfo.IsOSX) {
Log.Warn("Package will not be signed or notarized. Requires the --signAppIdentity and --notaryProfile options.");
} else {
Log.Warn("Package will not be signed or notarized. Only supported on OSX with the --signAppIdentity and --notaryProfile options.");
Log.Warn("Package will not be signed or notarized. Only supported on OSX.");
}

// create a portable zip package from signed/notarized bundle
Expand Down
7 changes: 5 additions & 2 deletions src/Squirrel.CommandLine/OSX/HelperExe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ public static void CodeSign(string identity, string entitlements, string filePat

Console.WriteLine(InvokeAndThrowIfNonZero("codesign", args, null));

Log.Info("codesign completed successfully");
}

public static void SpctlAssess(string filePath)
{
var args2 = new List<string> {
"--assess",
"-vvvv",
filePath
};

Console.WriteLine(InvokeAndThrowIfNonZero("spctl", args2, null));

Log.Info("codesign completed successfully");
}

[SupportedOSPlatform("osx")]
Expand Down

0 comments on commit bdcc078

Please sign in to comment.