mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
We should staple notarization to the .app and not the .zip
This commit is contained in:
@@ -129,6 +129,8 @@ namespace Squirrel.CommandLine.OSX
|
|||||||
HelperExe.CodeSign(options.signAppIdentity, options.signEntitlements, appBundlePath);
|
HelperExe.CodeSign(options.signAppIdentity, options.signEntitlements, appBundlePath);
|
||||||
HelperExe.CreateDittoZip(appBundlePath, zipPath);
|
HelperExe.CreateDittoZip(appBundlePath, zipPath);
|
||||||
HelperExe.Notarize(zipPath, options.notaryProfile);
|
HelperExe.Notarize(zipPath, options.notaryProfile);
|
||||||
|
HelperExe.Staple(appBundlePath);
|
||||||
|
File.Delete(zipPath);
|
||||||
} else if (SquirrelRuntimeInfo.IsOSX && !String.IsNullOrEmpty(options.signAppIdentity)) {
|
} else if (SquirrelRuntimeInfo.IsOSX && !String.IsNullOrEmpty(options.signAppIdentity)) {
|
||||||
HelperExe.CodeSign(options.signAppIdentity, options.signEntitlements, appBundlePath);
|
HelperExe.CodeSign(options.signAppIdentity, options.signEntitlements, appBundlePath);
|
||||||
Log.Warn("Package was signed but will not be notarized or verified. Must supply the --notaryProfile option.");
|
Log.Warn("Package was signed but will not be notarized or verified. Must supply the --notaryProfile option.");
|
||||||
@@ -177,6 +179,7 @@ namespace Squirrel.CommandLine.OSX
|
|||||||
HelperExe.CreateInstallerPkg(appBundlePath, pkgPath, options.signInstallIdentity);
|
HelperExe.CreateInstallerPkg(appBundlePath, pkgPath, options.signInstallIdentity);
|
||||||
if (!String.IsNullOrEmpty(options.signInstallIdentity) && !String.IsNullOrEmpty(options.notaryProfile)) {
|
if (!String.IsNullOrEmpty(options.signInstallIdentity) && !String.IsNullOrEmpty(options.notaryProfile)) {
|
||||||
HelperExe.Notarize(pkgPath, options.notaryProfile);
|
HelperExe.Notarize(pkgPath, options.notaryProfile);
|
||||||
|
HelperExe.Staple(pkgPath);
|
||||||
} else {
|
} else {
|
||||||
Log.Warn("Package installer (.pkg) will not be Notarized. " +
|
Log.Warn("Package installer (.pkg) will not be Notarized. " +
|
||||||
"This is supported with the --signInstallIdentity and --notaryProfile arguments.");
|
"This is supported with the --signInstallIdentity and --notaryProfile arguments.");
|
||||||
|
|||||||
@@ -156,7 +156,11 @@ namespace Squirrel.CommandLine.OSX
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log.Info("Notarization completed successfully");
|
Log.Info("Notarization completed successfully");
|
||||||
|
}
|
||||||
|
|
||||||
|
[SupportedOSPlatform("osx")]
|
||||||
|
public static void Staple(string filePath)
|
||||||
|
{
|
||||||
Log.Info($"Stapling Notarization to '{filePath}'");
|
Log.Info($"Stapling Notarization to '{filePath}'");
|
||||||
Console.WriteLine(InvokeAndThrowIfNonZero("xcrun", new[] { "stapler", "staple", filePath }, null));
|
Console.WriteLine(InvokeAndThrowIfNonZero("xcrun", new[] { "stapler", "staple", filePath }, null));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user